@vertesia/common 1.5.0-dev.20260901.045442Z → 1.5.0-dev.20260905.011013Z
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/lib/api-contract/components.generated.json +38 -10
- package/lib/api-schemas/agent-runs.d.ts +40 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -1
- package/lib/api-schemas/app-lifecycle.d.ts +1 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -1
- package/lib/api-schemas/app-lifecycle.js +8 -0
- package/lib/api-schemas/app-lifecycle.js.map +1 -1
- package/lib/api-schemas/app-runtime.d.ts +112 -0
- package/lib/api-schemas/app-runtime.d.ts.map +1 -1
- package/lib/api-schemas/content.d.ts +40 -0
- package/lib/api-schemas/content.d.ts.map +1 -1
- package/lib/api-schemas/document-processing.d.ts +24 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -1
- package/lib/api-schemas/embeddings.d.ts +5 -0
- package/lib/api-schemas/embeddings.d.ts.map +1 -1
- package/lib/api-schemas/embeddings.js +12 -1
- package/lib/api-schemas/embeddings.js.map +1 -1
- package/lib/api-schemas/events.d.ts +72 -0
- package/lib/api-schemas/events.d.ts.map +1 -1
- package/lib/api-schemas/interaction.d.ts +385 -0
- package/lib/api-schemas/interaction.d.ts.map +1 -1
- package/lib/api-schemas/interaction.js +17 -1
- package/lib/api-schemas/interaction.js.map +1 -1
- package/lib/api-schemas/project-configuration.d.ts +80 -0
- package/lib/api-schemas/project-configuration.d.ts.map +1 -1
- package/lib/api-schemas/project.d.ts +120 -0
- package/lib/api-schemas/project.d.ts.map +1 -1
- package/lib/api-schemas/registry.d.ts +1263 -0
- package/lib/api-schemas/registry.d.ts.map +1 -1
- package/lib/api-schemas/store.d.ts +400 -0
- package/lib/api-schemas/store.d.ts.map +1 -1
- package/lib/api-schemas/workflow-runs.d.ts +16 -0
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
- package/lib/appgen.d.ts +3 -0
- package/lib/appgen.d.ts.map +1 -0
- package/lib/appgen.js +3 -0
- package/lib/appgen.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/store/intake-policy-schema.generated.d.ts.map +1 -1
- package/lib/store/intake-policy-schema.generated.js +5 -1
- package/lib/store/intake-policy-schema.generated.js.map +1 -1
- package/lib/vertesia-common.js +2 -2
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +3 -3
- package/src/api-contract/components.generated.json +38 -10
- package/src/api-schemas/app-lifecycle.ts +9 -0
- package/src/api-schemas/embeddings.ts +14 -1
- package/src/api-schemas/environment.contract.test.ts +15 -0
- package/src/api-schemas/interaction.contract.test.ts +31 -0
- package/src/api-schemas/interaction.ts +17 -1
- package/src/api-schemas/llumiverse.contract.test.ts +16 -0
- package/src/appgen.ts +4 -0
- package/src/index.ts +1 -0
- package/src/store/intake-policy-schema.generated.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertesia-common.js","names":["RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","ref"],"sources":["access-control-values.js","access-control.js","apikey-values.js","apikey.js","apps.js","audit-trail.js","data-platform.js","email.js","../../../llumiverse/common/lib/capability/anthropic.js","../../../llumiverse/common/lib/options/version-parsing.js","../../../llumiverse/common/lib/capability/azure_foundry.js","../../../llumiverse/common/lib/capability/bedrock-models.js","../../../llumiverse/common/lib/capability/mistral.js","../../../llumiverse/common/lib/capability/openai.js","../../../llumiverse/common/lib/capability/vertexai.js","../../../llumiverse/common/lib/options/context-windows.js","../../../llumiverse/common/lib/types.js","../../../llumiverse/common/lib/model-directory.js","../../../llumiverse/common/lib/capability.js","../../../llumiverse/common/lib/options/fallback.js","../../../llumiverse/common/lib/options/vertexai.js","environment.js","group.js","integrations.js","interaction-values.js","interaction.js","oauth-scopes.js","platform-event.js","project-values.js","project.js","prompt.js","refs.js","schema-for-extraction.js","store/agent-approval.js","store/collections.js","store/conversation-state.js","store/dsl-workflow.js","store/editing-policy-schema.generated.js","store/intake-policy-schema.generated.js","store/process.js","store/workflow.js","store/rendering.js","store/schedule.js","store/store.js","sts-errors.js","training.js","transient-tokens-values.js","account-values.js","user.js","utils/auth.js","utils/schemas.js","versions.js","views.js","workflow-analytics.js"],"sourcesContent":["/**\n * Access-control values that exist at runtime — the enums and the scope list.\n *\n * Split out of `access-control.ts` and `roles/types.ts` for the same reason `account-values.ts` was\n * split out of `user.ts`: the API schemas need these values (`z.enum(Permission)`,\n * `z.enum(AbacScopes)`) while those two modules need the types the schemas infer. Keeping them where\n * they were would make each import a module that imports it back; here, both sides depend on this\n * module and nothing depends on them.\n *\n * Everything is re-exported from its original module, so existing import paths keep working — this\n * is a move, not a rename.\n */\nexport var Permission;\n(function (Permission) {\n Permission[\"int_read\"] = \"interaction:read\";\n Permission[\"int_write\"] = \"interaction:write\";\n Permission[\"int_delete\"] = \"interaction:delete\";\n Permission[\"int_execute\"] = \"interaction:execute\";\n Permission[\"run_read\"] = \"run:read\";\n Permission[\"run_write\"] = \"run:write\";\n Permission[\"env_admin\"] = \"environment:admin\";\n Permission[\"app_manage\"] = \"app:manage\";\n Permission[\"project_admin\"] = \"project:admin\";\n Permission[\"project_integration_read\"] = \"project:integration_read\";\n Permission[\"project_settings_write\"] = \"project:settings_write\";\n Permission[\"api_key_create\"] = \"api_key:create\";\n Permission[\"api_key_read\"] = \"api_key:read\";\n Permission[\"api_key_secret_read\"] = \"api_key:secret_read\";\n Permission[\"api_key_update\"] = \"api_key:update\";\n Permission[\"api_key_delete\"] = \"api_key:delete\";\n Permission[\"account_read\"] = \"account:read\";\n Permission[\"account_write\"] = \"account:write\";\n Permission[\"account_admin\"] = \"account:admin\";\n Permission[\"manage_billing\"] = \"account:billing\";\n /** View cost and usage analytics */\n Permission[\"billing_read\"] = \"billing:read\";\n /** View account and project audit events. */\n Permission[\"audit_read\"] = \"audit:read\";\n Permission[\"account_member\"] = \"account:member\";\n Permission[\"content_read\"] = \"content:read\";\n Permission[\"content_read_all\"] = \"content:read_all\";\n Permission[\"content_write\"] = \"content:write\";\n Permission[\"content_delete\"] = \"content:delete\";\n Permission[\"content_admin\"] = \"content:admin\";\n Permission[\"content_superadmin\"] = \"content:superadmin\";\n Permission[\"workflow_read\"] = \"workflow:read\";\n Permission[\"workflow_run\"] = \"workflow:run\";\n Permission[\"workflow_admin\"] = \"workflow:admin\";\n Permission[\"workflow_superadmin\"] = \"workflow:superadmin\";\n Permission[\"agent_run_read\"] = \"agent_run:read\";\n Permission[\"task_read\"] = \"task:read\";\n Permission[\"task_manage\"] = \"task:manage\";\n Permission[\"iam_impersonate\"] = \"iam:impersonate\";\n /** whether the user has access to Sutdio App. */\n Permission[\"studio_access\"] = \"studio:access\";\n})(Permission || (Permission = {}));\nexport var AccessControlResourceType;\n(function (AccessControlResourceType) {\n AccessControlResourceType[\"project\"] = \"project\";\n AccessControlResourceType[\"environment\"] = \"environment\";\n AccessControlResourceType[\"account\"] = \"account\";\n AccessControlResourceType[\"interaction\"] = \"interaction\";\n AccessControlResourceType[\"app\"] = \"application\";\n /**\n * Dynamic resource matching by property conditions at query time. The role\n * partitions (content, future tasks/etc.) determine which kind of object\n * the conditions match — selected via `AceConditions.scope`.\n *\n * NOTE: the string value remains `'content_set'` for backward compatibility\n * with stored ACEs and JWTs. The wire/DB rename to `'resource_set'` is a\n * separate concern (deferred). Until then, code reads\n * `AccessControlResourceType.resource_set` but the value on the wire stays\n * `'content_set'`.\n */\n AccessControlResourceType[\"resource_set\"] = \"content_set\";\n})(AccessControlResourceType || (AccessControlResourceType = {}));\nexport var AccessControlPrincipalType;\n(function (AccessControlPrincipalType) {\n AccessControlPrincipalType[\"user\"] = \"user\";\n AccessControlPrincipalType[\"group\"] = \"group\";\n AccessControlPrincipalType[\"apikey\"] = \"apikey\";\n /** Dynamic principal matching by user/group properties at token time. */\n AccessControlPrincipalType[\"principal_set\"] = \"principal_set\";\n})(AccessControlPrincipalType || (AccessControlPrincipalType = {}));\n/**\n * Kind of object a ResourceSet's `resource_props` matches at query time. Used\n * in `AceConditions.scope` (validated at runtime against this list) and as\n * the prefix in JWT `content_security` keys (e.g. `collection:read`).\n *\n * Each scope is owned by exactly one partition. When adding a new partition\n * (e.g. tasks), extend this list with the new scope(s) AND extend `RoleDomain`\n * with the new domain.\n */\nexport const AbacScopes = ['document', 'collection', 'task'];\n/**\n * Logical grouping of roles by the service area that owns them. Declared as a\n * runtime list so the role schemas can publish it as an enum component; the\n * `RoleDomain` type is inferred from it in `roles/types.ts`.\n */\nexport const RoleDomains = ['system', 'content', 'tasks'];\n//# sourceMappingURL=access-control-values.js.map","/**\n * The enums live in `./access-control-values.js` so the API schemas can consume them without\n * importing this module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './access-control-values.js';\n/** Human-readable labels for each security level, indexed by numeric value. */\nexport const SecurityLevelLabels = ['Public', 'Internal', 'Confidential', 'Restricted', 'Secret'];\n//# sourceMappingURL=access-control.js.map","/**\n * API key values that exist at runtime.\n *\n * Split out of `apikey.ts` so `api-schemas/apikey.ts` can read the enum without importing a module\n * that derives its types from those very schemas. Re-exported from `apikey.ts`.\n */\nexport var ApiKeyTypes;\n(function (ApiKeyTypes) {\n ApiKeyTypes[\"secret\"] = \"sk\";\n})(ApiKeyTypes || (ApiKeyTypes = {}));\n//# sourceMappingURL=apikey-values.js.map","/**\n * `ApiKeyTypes` lives in `./apikey-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './apikey-values.js';\nexport var PrincipalType;\n(function (PrincipalType) {\n PrincipalType[\"User\"] = \"user\";\n PrincipalType[\"OAuthAccess\"] = \"oauth_access\";\n PrincipalType[\"Group\"] = \"group\";\n PrincipalType[\"ApiKey\"] = \"apikey\";\n PrincipalType[\"ServiceAccount\"] = \"service_account\";\n PrincipalType[\"Agent\"] = \"agent\";\n PrincipalType[\"Schedule\"] = \"schedule\";\n})(PrincipalType || (PrincipalType = {}));\n//# sourceMappingURL=apikey.js.map","/** Allowed values for AppUINavItem.preferredSection */\nexport const PREFERRED_SECTIONS = ['default', 'footer', 'settings'];\nfunction deriveMCPCollectionId(input) {\n return input\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/_+/g, '_');\n}\n/**\n * Normalizes a tool collection to the object format.\n * Applies optional `{{var}}` substitution to the URL so manifests can reference\n * deployment-time variables like `{{studio_ui}}`.\n *\n * @param collection - ToolCollectionObject\n * @param vars - Optional endpoint variables to substitute in URLs\n * @returns Normalized ToolCollectionObject\n */\nexport function normalizeToolCollection(collection, vars) {\n if (!collection || typeof collection !== 'object') {\n throw new TypeError('Tool collection must be an object');\n }\n const substitutedUrl = vars && collection.url ? substituteEndpoints(collection.url, vars) : collection.url;\n const urlChanged = substitutedUrl !== collection.url;\n if (collection.type === 'mcp') {\n const fallbackId = deriveMCPCollectionId(collection.id || collection.name || collection.url);\n if (urlChanged || !collection.id) {\n return {\n ...collection,\n url: substitutedUrl,\n id: collection.id || fallbackId,\n };\n }\n }\n else if (urlChanged) {\n return { ...collection, url: substitutedUrl };\n }\n return collection;\n}\n/**\n * Canonical app capabilities Studio renders/supports. The public type is derived from\n * this list so runtime validation and TypeScript cannot drift.\n */\nexport const APP_CAPABILITIES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n];\n/**\n * Header carrying the app version a generated-app UI is running, so studio/zeno resolve app-owned\n * capability refs (`app:<app>:...`) against that exact version instead of the promoted version.\n * Resolution-time only; never persisted. Set by the generated app template via client.withAppVersion.\n */\nexport const APP_VERSION_HEADER = 'x-vertesia-app-version';\n/**\n * Substitutes `{{key}}` placeholders in a URL with the matching endpoint.\n * Unknown placeholders are left untouched (so failures surface as fetch errors\n * with the unresolved placeholder visible, rather than silently pointing nowhere).\n * Trailing slashes on replacement values are stripped to avoid `//api/...` joins.\n */\nfunction substituteEndpoints(url, endpoints) {\n if (!url || !endpoints)\n return url;\n return url.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (match, key) => {\n const value = endpoints[key];\n if (typeof value !== 'string' || !value)\n return match;\n return trimTrailingSlashes(value);\n });\n}\nfunction trimTrailingSlashes(value) {\n let end = value.length;\n while (end > 0 && value[end - 1] === '/') {\n end--;\n }\n return end === value.length ? value : value.slice(0, end);\n}\n/**\n * Canonical package scopes, including the catch-all `all`. The public type is derived\n * from this list so request parsing and TypeScript cannot drift.\n */\nexport const APP_PACKAGE_SCOPES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n 'settings',\n 'widgets',\n 'activities',\n 'hooks',\n 'subscriptions',\n 'all',\n];\n//# sourceMappingURL=apps.js.map","export const AUDIT_ACTIONS = [\n // CRUD operations\n 'create',\n 'update',\n 'delete',\n 'bulk_create',\n 'bulk_change_type',\n 'bulk_update',\n 'bulk_delete',\n 'attach',\n 'detach',\n 'credentials_fill',\n 'credentials_totp_generation',\n 'publish',\n 'unpublish',\n // Billable operations\n 'inference',\n 'embedding',\n 'image_generation',\n // Content processing outcomes\n 'document_processed',\n];\nexport const AUDIT_AGGREGATION_DIMENSIONS = [\n 'time',\n 'action',\n 'resource_type',\n 'event_category',\n 'provider',\n 'project_id',\n 'details.pipeline',\n 'details.verdict',\n 'details.workflow_type',\n 'details.rule_id',\n 'model',\n];\n/** Billable audit actions for cost analytics queries */\nexport const BILLABLE_AUDIT_ACTIONS = ['inference', 'embedding', 'image_generation'];\n//# sourceMappingURL=audit-trail.js.map","// ============================================================================\n// Column Types\n// ============================================================================\n/**\n * Supported column data types for DuckDB tables.\n */\nexport const DataColumnType = {\n STRING: 'STRING',\n INTEGER: 'INTEGER',\n BIGINT: 'BIGINT',\n FLOAT: 'FLOAT',\n DOUBLE: 'DOUBLE',\n DECIMAL: 'DECIMAL',\n BOOLEAN: 'BOOLEAN',\n DATE: 'DATE',\n TIMESTAMP: 'TIMESTAMP',\n JSON: 'JSON',\n};\n/**\n * Semantic types that provide AI agents with context about column meaning.\n */\nexport const SemanticColumnType = {\n EMAIL: 'email',\n PHONE: 'phone',\n URL: 'url',\n CURRENCY: 'currency',\n PERCENTAGE: 'percentage',\n PERSON_NAME: 'person_name',\n ADDRESS: 'address',\n COUNTRY: 'country',\n DATE_ISO: 'date_iso',\n IDENTIFIER: 'identifier',\n};\n/**\n * Mapping from DataColumnType to DuckDB SQL types.\n */\nexport const DATA_COLUMN_TYPE_TO_DUCKDB = {\n [DataColumnType.STRING]: 'VARCHAR',\n [DataColumnType.INTEGER]: 'INTEGER',\n [DataColumnType.BIGINT]: 'BIGINT',\n [DataColumnType.FLOAT]: 'FLOAT',\n [DataColumnType.DOUBLE]: 'DOUBLE',\n [DataColumnType.DECIMAL]: 'DECIMAL(18,4)',\n [DataColumnType.BOOLEAN]: 'BOOLEAN',\n [DataColumnType.DATE]: 'DATE',\n [DataColumnType.TIMESTAMP]: 'TIMESTAMP',\n [DataColumnType.JSON]: 'JSON',\n};\n// ============================================================================\n// Data Store Types\n// ============================================================================\n/**\n * Data store lifecycle status.\n */\nexport const DataStoreStatus = {\n CREATING: 'creating',\n ACTIVE: 'active',\n ERROR: 'error',\n ARCHIVED: 'archived',\n};\n// ============================================================================\n// Import Types\n// ============================================================================\n/**\n * Import job status.\n */\nexport const ImportStatus = {\n PENDING: 'pending',\n PROCESSING: 'processing',\n COMPLETED: 'completed',\n FAILED: 'failed',\n ROLLED_BACK: 'rolled_back',\n};\n/**\n * Default retention configuration: 30 days, snapshots exempt.\n */\nexport const DEFAULT_RETENTION_CONFIG = {\n retention_days: 30,\n snapshots_exempt: true,\n};\n// ============================================================================\n// Dashboard Types\n// ============================================================================\n/**\n * Dashboard lifecycle status.\n */\nexport const DashboardStatus = {\n /** Dashboard is active and usable */\n ACTIVE: 'active',\n /** Dashboard has been archived (soft deleted) */\n ARCHIVED: 'archived',\n};\n/**\n * Default layout configuration for dashboards.\n *\n * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.\n */\nexport const DEFAULT_DASHBOARD_LAYOUT = {\n columns: 2,\n cellWidth: 600,\n cellHeight: 400,\n padding: 20,\n};\n//# sourceMappingURL=data-platform.js.map","/**\n * Type guard for email channels\n */\nexport function isEmailChannel(channel) {\n return channel.type === 'email';\n}\n/**\n * Type guard for interactive channels\n */\nexport function isInteractiveChannel(channel) {\n return channel.type === 'interactive';\n}\n//# sourceMappingURL=email.js.map","// Explicit model exceptions\nconst RECORD_MODEL_CAPABILITIES = {\n // claude-3-5-haiku: no image input\n 'claude-3-5-haiku-20241022': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Family-level capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n 'claude-3-5-haiku': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-haiku': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-sonnet': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-opus': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-7': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\nconst DEFAULT_CLAUDE_CAPABILITIES = {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n};\nexport function getModelCapabilitiesAnthropic(model) {\n const lower = model.toLowerCase();\n // Exact match first\n if (lower in RECORD_MODEL_CAPABILITIES) {\n return RECORD_MODEL_CAPABILITIES[lower];\n }\n // Longest prefix family match\n let bestKey;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (lower.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n if (bestKey) {\n return RECORD_FAMILY_CAPABILITIES[bestKey];\n }\n return DEFAULT_CLAUDE_CAPABILITIES;\n}\n//# sourceMappingURL=anthropic.js.map","/**\n * Version parsing utilities for Claude, OpenAI, and Gemini models.\n *\n * Provides version detection helpers that are forward-compatible with future\n * model releases (e.g., Fable 5, Mythos 5, GPT-5.6, and Gemini 3.5).\n *\n * These helpers are used to:\n * - Control option visibility in the UI\n * - Construct appropriate API payloads for each model version\n *\n * Note: llumiverse does NOT validate options here. Errors from invalid\n * parameters propagate to the provider side.\n */\n// ============================================================================\n// Generic Model-Family Version Parsing\n// ============================================================================\n/**\n * Check a numeric model-family suffix using major/minor ordering.\n *\n * The family includes the stable part immediately before the version, for\n * example `openai.gpt-`, `xai.grok-`, or `deepseek.v`. This deliberately\n * accepts later versions so new models inherit the newest known behavior.\n */\nexport function isModelFamilyVersionGTE(modelString, family, targetMajor, targetMinor) {\n const normalized = modelString.toLowerCase();\n const familyIndex = normalized.indexOf(family.toLowerCase());\n if (familyIndex === -1)\n return false;\n const version = normalized.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!version)\n return false;\n const major = Number(version[1]);\n const minor = Number(version[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nfunction isClaudeVariant(value) {\n return value === 'opus' || value === 'sonnet' || value === 'haiku' || value === 'fable' || value === 'mythos';\n}\n/**\n * Parse Claude model version from a model string.\n *\n * Examples:\n * - \"claude-opus-4-7\" -> { major: 4, minor: 7, variant: 'opus' }\n * - \"claude-sonnet-4-6\" -> { major: 4, minor: 6, variant: 'sonnet' }\n * - \"claude-3-7-sonnet-20250219\" -> { major: 3, minor: 7, variant: 'sonnet' }\n * - \"claude-opus-4-6\" -> { major: 4, minor: 6, variant: 'opus' }\n *\n * @param modelString - The model identifier string\n * @returns Parsed version info, or null if not parseable\n */\nexport function parseClaudeVersion(modelString) {\n if (/claude-mythos-preview(?:-|\\b)/i.test(modelString)) {\n return { major: 5, minor: 0, variant: 'mythos' };\n }\n // Match pattern: claude-[variant-]-{major}-[optional minor]\n // The minor version is limited to 1-2 digits to avoid matching dates (YYYYMMDD format)\n const match = modelString.match(/claude-(opus|sonnet|haiku|fable|mythos)-?(\\d+)(?:-(\\d{1,2}))?(?:-|\\b)/i);\n if (match) {\n const variant = match[1].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n const major = parseInt(match[2], 10);\n const minor = match[3] ? parseInt(match[3], 10) : 0;\n return { major, minor, variant };\n }\n // Fallback for older format: claude-3-7-sonnet-20250219\n const fallbackMatch = modelString.match(/claude-(\\d+)-(\\d+)-(opus|sonnet|haiku|fable|mythos)(?:-|\\b)/i);\n if (fallbackMatch) {\n const major = parseInt(fallbackMatch[1], 10);\n const minor = parseInt(fallbackMatch[2], 10);\n const variant = fallbackMatch[3].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n return { major, minor, variant };\n }\n return null;\n}\n/**\n * Check if a Claude model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model version is >= target version, false otherwise\n */\nexport function isClaudeVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n if (version.major > targetMajor) {\n return true;\n }\n if (version.major === targetMajor && version.minor >= targetMinor) {\n return true;\n }\n return false;\n}\n/**\n * Check if a Claude variant model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param variant - Model family: \"opus\" or \"sonnet\"\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model matches the variant and version >= target\n */\nfunction isClaudeVariantVersionGTE(modelString, variant, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version)\n return false;\n if (version.variant.toLowerCase() !== variant)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\n/**\n * Check if a model requires sampling parameter removal (behavior: sampling params removed on Opus 4.7+).\n *\n * This includes:\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 7\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.7+ or equivalent future model\n */\nexport function hasSamplingParameterRemoval(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 7);\n}\n/**\n * Check if a model requires adaptive thinking (behavior: adaptive thinking required on Opus 4.6+).\n *\n * This includes:\n * - claude-opus-4-6\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 6\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.6+ or equivalent future model\n */\nexport function requiresAdaptiveThinking(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 6);\n}\n/**\n * Check if a model supports adaptive thinking.\n *\n * Adaptive thinking was introduced in:\n * - Claude Opus 4.6\n * - Claude Sonnet 4.6\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports adaptive thinking\n */\nexport function supportsAdaptiveThinking(modelString) {\n return (isClaudeVersionGTE(modelString, 5, 0) ||\n requiresAdaptiveThinking(modelString) ||\n isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6));\n}\n/**\n * Check if extended thinking is deprecated for this model.\n *\n * Extended thinking (thinking.type: \"enabled\" with budget_tokens) is deprecated\n * but still functional on:\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is deprecated (adaptive thinking recommended)\n */\nexport function isExtendedThinkingDeprecated(modelString) {\n return supportsAdaptiveThinking(modelString);\n}\n/**\n * Check if a model requires adaptive thinking ONLY (extended thinking removed).\n *\n * On Opus 4.7+, extended thinking returns a 400 error. Only adaptive thinking is supported.\n * Future models (Sonnet 4.7+, Haiku 4.7+, any 5.0+) follow the same pattern.\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is removed (returns 400 error)\n */\nexport function requiresAdaptiveThinkingOnly(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/**\n * Check if a model has sampling parameter restrictions.\n *\n * On Opus 4.7+, setting temperature, top_p, or top_k to any non-default value\n * returns a 400 error. Future models following the same pattern will also match:\n * - Opus 4.7+ (current restriction)\n * - Sonnet 4.7+, Haiku 4.7+ (future minor versions >= 7)\n * - Sonnet 5.0+, Haiku 5.0+, Opus 5.0+ (future major versions)\n *\n * @param modelString - The model identifier string\n * @returns true if sampling parameters are restricted\n */\nexport function hasSamplingParameterRestriction(modelString) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n // Future major versions (5.0+) follow the same pattern as 4.7\n if (version.major > 4) {\n return true;\n }\n // Version 4.7+ (Opus 4.7, Sonnet 4.7, Haiku 4.7, etc.)\n if (version.major === 4 && version.minor >= 7) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the effort parameter.\n *\n * Effort is supported on:\n * - Claude Opus 4.5+\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n * - All variants at 4.7+ (Opus, Sonnet, Haiku)\n * - All variants at 5.0+\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports the effort parameter\n */\nexport function supportsEffort(modelString) {\n // All 4.7+ variants support effort (covers future Sonnet 4.7, Haiku 4.7, etc.)\n if (hasSamplingParameterRestriction(modelString)) {\n return true;\n }\n // Opus 4.5+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'opus', 4, 5)) {\n return true;\n }\n // Sonnet 4.6+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6)) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the xhigh effort level.\n *\n * xhigh is available on the sampling-restricted Claude generation and Mythos Preview.\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports xhigh effort\n */\nexport function supportsXHighEffort(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/** Parse GPT family versions from bare IDs, snapshots, or provider-qualified paths. */\nexport function parseOpenAIGptVersion(modelString) {\n const match = modelString.toLowerCase().match(/(?:^|[./:])(?:openai\\.)?gpt-(\\d+)(?:\\.(\\d+))?(?:-|[.:@]|$)/);\n if (!match)\n return null;\n return { major: Number(match[1]), minor: Number(match[2] ?? '0') };\n}\nexport function isOpenAIGptVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseOpenAIGptVersion(modelString);\n if (!version)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\nexport function isOpenAIGptProModel(modelString) {\n return /(?:^|[./:])(?:openai\\.)?gpt-\\d+(?:\\.\\d+)?-pro(?:-|[.:@]|$)/i.test(modelString);\n}\n/** Current reasoning-effort metadata, expressed with version thresholds for future GPT releases. */\nexport function getOpenAIReasoningEffortLevels(modelString) {\n if (!isOpenAIGptVersionGTE(modelString, 5, 0))\n return null;\n if (isOpenAIGptProModel(modelString)) {\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { Medium: 'medium', 'High (default)': 'high', 'Extra High': 'xhigh' };\n }\n return { 'High (only)': 'high' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 6)) {\n return {\n None: 'none',\n Low: 'low',\n Medium: 'medium',\n High: 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high', 'Extra High': 'xhigh' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 1)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\n/**\n * Get the available effort levels for a given Claude model.\n *\n * - Opus 4.7+: low, medium, high, xhigh, max\n * - Opus 4.5+, Opus 4.6+, Sonnet 4.6+: low, medium, high, max\n * - Other models: empty (effort not supported)\n *\n * @param modelString - The model identifier string\n * @returns Record of display label to effort level value, or null if not supported\n */\nexport function getAvailableEffortLevels(modelString) {\n if (!supportsEffort(modelString)) {\n return null;\n }\n const levels = {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n Max: 'max',\n };\n if (supportsXHighEffort(modelString)) {\n // Insert xhigh between high and max\n return {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n return levels;\n}\n// ============================================================================\n// Gemini Version Parsing\n// ============================================================================\n/**\n * Extract Gemini version from a model ID.\n *\n * Examples:\n * - \"locations/global/publishers/google/models/gemini-2.5-flash\" -> \"2.5\"\n * - \"publishers/google/models/gemini-3-pro-image-preview\" -> \"3\"\n * - \"gemini-3.1-flash-lite-preview\" -> \"3.1\"\n *\n * @param modelId - The model identifier string\n * @returns Version string (e.g., \"2.5\", \"3\", \"3.1\"), or undefined if not parseable\n */\nexport function getGeminiModelVersion(modelId) {\n const modelName = modelId.split('/').pop() ?? modelId;\n const match = modelName.match(/^gemini-(\\d+(?:\\.\\d+)?)/i);\n return match?.[1];\n}\n/**\n * Parse a version string into major.minor components.\n *\n * @param version - Version string (e.g., \"2.5\", \"3\", \"3.1\")\n * @returns Parsed version, or undefined if not parseable\n */\nexport function parseGeminiVersion(version) {\n const match = version.match(/^(\\d+)(?:\\.(\\d+))?$/);\n if (!match) {\n return undefined;\n }\n return {\n major: Number(match[1]),\n minor: Number(match[2] ?? '0'),\n };\n}\n/**\n * Check if a Gemini model version is greater than or equal to a minimum version.\n *\n * @param modelId - The model identifier string\n * @param minVersion - Minimum version string (e.g., \"2.5\", \"3.0\")\n * @returns true if model version >= min version\n */\nexport function isGeminiModelVersionGte(modelId, minVersion) {\n const modelVersion = getGeminiModelVersion(modelId);\n if (!modelVersion) {\n return false;\n }\n const current = parseGeminiVersion(modelVersion);\n const target = parseGeminiVersion(minVersion);\n if (!current || !target) {\n return false;\n }\n if (current.major > target.major) {\n return true;\n }\n if (current.major < target.major) {\n return false;\n }\n return current.minor >= target.minor;\n}\n//# sourceMappingURL=version-parsing.js.map","import { isModelFamilyVersionGTE } from '../options/version-parsing.js';\n// Global feature flags - temporarily disable tool support for non-OpenAI models\nconst ENABLE_TOOL_SUPPORT_NON_OPENAI = false;\n// Record of Azure Foundry model capabilities keyed by model ID (lowercased)\n// Only include models with specific exceptions that differ from their family patterns\nconst RECORD_MODEL_CAPABILITIES = {\n // OpenAI O-series exceptions - o1-mini doesn't have tool support like other o1 models\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // OpenAI o3 is text-only unlike other o-series models\n o3: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Models with special properties not covered by family patterns\n 'deepseek-r1-0528': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3-0324': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-medium-2505': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-nemo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-4-scout-17b-16e-instruct': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n // OpenAI GPT families\n 'gpt-3.5-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // OpenAI O-series families\n o1: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-preview': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-pro': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o3-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o4-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o4: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Llama families\n 'llama-3.1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-3.3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Mistral families\n 'mistral-large': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'mistral-small': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n mistral: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Microsoft Phi families\n 'phi-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n phi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // DeepSeek families\n 'deepseek-r1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // AI21 families\n 'ai21-jamba': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n ai21: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n jamba: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // Cohere families\n 'cohere-command': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n cohere: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n command: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // xAI families\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n grok: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image', 'vision'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'gpt-4',\n 'gpt-4o',\n 'o1',\n 'o3',\n 'o4',\n 'llama-3',\n 'mistral-large',\n 'mistral-small',\n 'jamba',\n 'cohere',\n 'command',\n 'grok',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for an Azure Foundry model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to family pattern matching.\n */\nexport function getModelCapabilitiesAzureFoundry(model) {\n // Extract base model from composite ID (deployment::baseModel)\n const { baseModel } = parseAzureFoundryModelId(model);\n const normalized = baseModel.toLowerCase();\n // 1. Exact match in record\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n return applyGlobalToolSupportDisable(record, normalized);\n }\n if (isModelFamilyVersionGTE(normalized, 'llama-', 4, 0) || isModelFamilyVersionGTE(normalized, 'llama', 4, 0)) {\n // Future Llama deployments inherit the latest known Foundry family behavior.\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES['llama-4'], normalized);\n }\n // 2. Fallback: find the longest matching family prefix in RECORD_FAMILY_CAPABILITIES\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES[bestFamilyKey], normalized);\n }\n // 3. Fallback: infer from normalized name using patterns\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || true, // Default to text input\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || true, // Default to text output\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n const tool_support_streaming = tool_support || undefined;\n const inferredCapabilities = { input, output, tool_support, tool_support_streaming };\n return applyGlobalToolSupportDisable(inferredCapabilities, normalized);\n}\n/**\n * Apply global tool support disable for non-OpenAI models.\n * Preserves model-specific information for future use while temporarily disabling tool support.\n */\nfunction applyGlobalToolSupportDisable(capabilities, modelName) {\n // Check if this is an OpenAI model\n const isOpenAIModel = modelName.startsWith('gpt-') ||\n modelName.startsWith('o1') ||\n modelName.startsWith('o3') ||\n modelName.startsWith('o4');\n if (!ENABLE_TOOL_SUPPORT_NON_OPENAI && !isOpenAIModel) {\n // Disable tool support for non-OpenAI models while preserving other capabilities\n return {\n ...capabilities,\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n return capabilities;\n}\n// Helper function to parse composite model IDs\nfunction parseAzureFoundryModelId(compositeId) {\n const parts = compositeId.split('::');\n if (parts.length === 2) {\n return {\n deploymentName: parts[0],\n baseModel: parts[1],\n };\n }\n // Backwards compatibility: if no delimiter found, treat as deployment name\n return {\n deploymentName: compositeId,\n baseModel: compositeId,\n };\n}\n//# sourceMappingURL=azure_foundry.js.map","import { parseClaudeVersion } from '../options/version-parsing.js';\nfunction includesAny(model, patterns) {\n return patterns.some((pattern) => model.includes(pattern));\n}\nfunction isFamilyVersionGte(model, family, targetMajor, targetMinor = 0) {\n const familyIndex = model.indexOf(family);\n if (familyIndex === -1)\n return false;\n const match = model.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\n/**\n * Geographic prefix carried by cross-region inference IDs (`us.`, `eu.`, `apac.`, `us-gov.`, `global.`).\n * No publisher segment collides with these, so the prefix can be stripped wherever it appears — not\n * only inside an inference-profile ARN, since callers also pass the bare `us.<publisher>.<model>` ID.\n */\nconst GEO_PREFIX = /^(?:[a-z]{2}(?:-gov)?|apac|global)\\./;\nexport function normalizeBedrockModelId(model) {\n const normalized = model.toLowerCase();\n const slash = normalized.lastIndexOf('/');\n const modelId = slash === -1 ? normalized : normalized.slice(slash + 1);\n return modelId.replace(GEO_PREFIX, '');\n}\nfunction getModalities(model) {\n if (includesAny(model, ['nova-2-multimodal-embeddings', 'titan-embed', 'cohere.embed', 'marengo-embed'])) {\n return {\n input: {\n text: true,\n image: includesAny(model, ['multimodal', 'embed-image', 'embed-v4', 'marengo']),\n video: includesAny(model, ['multimodal', 'marengo']),\n audio: model.includes('multimodal'),\n embed: false,\n },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n };\n }\n if (includesAny(model, ['nova-canvas', 'titan-image-generator'])) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n };\n }\n if (model.includes('nova-reel')) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: false, embed: false },\n };\n }\n const image = (model.includes('anthropic.claude') && !model.includes('claude-3-5-haiku')) ||\n (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('google.gemma') ||\n includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b']) ||\n isFamilyVersionGte(model, 'meta.llama', 4) ||\n includesAny(model, [\n 'mistral.magistral-',\n 'mistral.ministral-3-',\n 'mistral.mistral-large-3-',\n 'mistral.pixtral-',\n ]) ||\n isFamilyVersionGte(model, 'kimi-k', 2, 5) ||\n model.includes('nemotron-nano-12b') ||\n model.includes('qwen3-vl') ||\n model.includes('palmyra-vision') ||\n (model.startsWith('openai.gpt-') && !model.includes('gpt-oss')) ||\n model.startsWith('xai.grok-');\n const video = (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('twelvelabs.pegasus') ||\n isFamilyVersionGte(model, 'google.gemma-', 4);\n const audio = includesAny(model, ['nova-sonic', 'mistral.voxtral-']) || model.includes('google.gemma-4-e2b');\n return {\n input: { text: !model.includes('nova-sonic-v1'), image, video, audio, embed: false },\n output: { text: true, image: false, video: false, audio: model.includes('nova-sonic'), embed: false },\n };\n}\nfunction getLimits(model) {\n if (model.includes('ai21.jamba'))\n return { context_window: 256_000, max_output_tokens: 4_096 };\n if (model.includes('amazon.nova-2'))\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n if (model.includes('amazon.nova-premier'))\n return { context_window: 1_000_000, max_output_tokens: 25_600 };\n if (model.includes('amazon.nova-micro'))\n return { context_window: 128_000, max_output_tokens: 5_120 };\n if (includesAny(model, ['amazon.nova-lite', 'amazon.nova-pro'])) {\n return { context_window: 300_000, max_output_tokens: 5_120 };\n }\n if (model.includes('anthropic.claude')) {\n // Version rules rather than an ID list, so a newly released variant inherits the limits of the\n // newest understood generation instead of silently reporting no limits at all.\n const claude = parseClaudeVersion(model);\n if (claude) {\n const atLeast = (major, minor) => claude.major > major || (claude.major === major && claude.minor >= minor);\n if (atLeast(4, 7) || (claude.variant === 'opus' && atLeast(4, 6))) {\n // Bedrock enforces an EXCLUSIVE 128K bound for this family: it rejects\n // max_tokens >= 128000 with \"Try again with a maximum tokens value that\n // is lower than 128000\" (same exclusive-bound quirk as Haiku 4.5 below).\n return { context_window: 1_000_000, max_output_tokens: 127_999 };\n }\n if (claude.variant === 'sonnet' && atLeast(4, 6)) {\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n }\n if (atLeast(4, 5)) {\n // Bedrock documents 64K for Haiku 4.5 but rejects max_tokens=64000; its bound is exclusive.\n return {\n context_window: 200_000,\n max_output_tokens: claude.variant === 'haiku' ? 63_999 : 65_536,\n };\n }\n if (atLeast(4, 0)) {\n return {\n context_window: 200_000,\n max_output_tokens: claude.variant === 'opus' ? 32_000 : 65_536,\n };\n }\n }\n if (model.includes('claude-3-5-haiku'))\n return { context_window: 200_000, max_output_tokens: 8_192 };\n if (model.includes('claude-3-haiku'))\n return { context_window: 200_000, max_output_tokens: 4_096 };\n }\n if (model.includes('cohere.command-r'))\n return { context_window: 128_000, max_output_tokens: 4_096 };\n if (isFamilyVersionGte(model, 'deepseek.v', 3, 2)) {\n return { context_window: 163_840, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['deepseek.v3', 'deepseek.r1']))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('google.gemma-4-31b') || model.includes('google.gemma-4-26b')) {\n return { context_window: 256_000 };\n }\n if (model.includes('google.gemma-4-e2b'))\n return { context_window: 128_000 };\n if (model.includes('google.gemma-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (isFamilyVersionGte(model, 'meta.llama', 4)) {\n // Future Llama releases inherit the latest provider limit family while retaining the documented Scout split.\n return { context_window: model.includes('scout') ? 10_000_000 : 1_000_000, max_output_tokens: 8_192 };\n }\n if (model.includes('meta.llama3-') &&\n !model.includes('llama3-1') &&\n !model.includes('llama3-2') &&\n !model.includes('llama3-3')) {\n return { context_window: 8_192, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['meta.llama3-1', 'meta.llama3-2', 'meta.llama3-3'])) {\n return { context_window: 128_000, max_output_tokens: 4_096 };\n }\n if (isFamilyVersionGte(model, 'minimax.minimax-m', 2, 1)) {\n return { context_window: 196_000, max_output_tokens: 8_192 };\n }\n if (model.includes('minimax.minimax-m2'))\n return { context_window: 1_000_000, max_output_tokens: 8_192 };\n if (includesAny(model, ['mistral.devstral-2', 'mistral.mistral-large-3'])) {\n return { context_window: 256_000, max_output_tokens: 32_768 };\n }\n if (model.includes('mistral.magistral-'))\n return { context_window: 128_000, max_output_tokens: 40_960 };\n if (model.includes('mistral.ministral-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('mistral.pixtral-'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (includesAny(model, [\n 'mistral.mistral-7b',\n 'mistral.mistral-large-2402',\n 'mistral.mistral-small-2402',\n 'mistral.mixtral-',\n 'mistral.voxtral-',\n ])) {\n return { context_window: 32_000, max_output_tokens: model.includes('voxtral') ? undefined : 4_096 };\n }\n if (includesAny(model, ['moonshot.kimi-k2', 'moonshotai.kimi-k2'])) {\n return { context_window: 256_000, max_output_tokens: 16_384 };\n }\n if (model.includes('nvidia.nemotron-super-'))\n return { context_window: 256_000, max_output_tokens: 32_768 };\n const nemotronNanoGeneration = model.match(/nvidia\\.nemotron-nano-(\\d+)-/)?.[1];\n if (nemotronNanoGeneration && Number(nemotronNanoGeneration) >= 3) {\n return { context_window: 256_000, max_output_tokens: 8_192 };\n }\n if (model.includes('nvidia.nemotron-nano-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (isFamilyVersionGte(model, 'openai.gpt-', 5) && !model.includes('gpt-oss')) {\n return { context_window: 272_000, max_output_tokens: 128_000 };\n }\n if (model.includes('openai.gpt-oss'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-235b'))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-32b'))\n return { context_window: 32_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-coder-30b'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-480b'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-next'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (includesAny(model, ['qwen3-next-', 'qwen3-vl-']))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('writer.palmyra-vision'))\n return { context_window: 4_096, max_output_tokens: 4_096 };\n if (includesAny(model, ['writer.palmyra-x4', 'writer.palmyra-x5'])) {\n return { context_window: 128_000, max_output_tokens: 8_192 };\n }\n if (model.startsWith('xai.grok-'))\n return { context_window: 1_000_000 };\n if (includesAny(model, ['zai.glm-4.7', 'zai.glm-4.6']))\n return { context_window: 203_000, max_output_tokens: 4_096 };\n if (model.includes('zai.glm-5'))\n return { context_window: 200_000, max_output_tokens: 131_072 };\n return {};\n}\nfunction getRuntimeToolSupport(model) {\n let toolSupport;\n let streaming = false;\n if (model.includes('gpt-oss-safeguard') || model.includes('deepseek.r1')) {\n toolSupport = false;\n }\n else if (model.includes('anthropic.claude')) {\n toolSupport = true;\n streaming = !model.includes('claude-3-5-haiku');\n }\n else if (model.includes('ai21.jamba') && !model.includes('jamba-instruct')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('amazon.nova') && !includesAny(model, ['nova-canvas', 'nova-reel'])) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('cohere.command-r')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('meta.llama3-1')) {\n toolSupport = true;\n streaming = false;\n }\n else if (includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b'])) {\n toolSupport = true;\n }\n else if (isFamilyVersionGte(model, 'meta.llama', 4)) {\n // Bedrock's Converse behavior is family-stable here; future Llama generations inherit Llama 4 tool support.\n toolSupport = true;\n streaming = false;\n }\n else if (includesAny(model, ['qwen.qwen3-235b', 'qwen.qwen3-32b'])) {\n toolSupport = true;\n streaming = false;\n }\n else if (model.startsWith('deepseek.') && !model.includes('deepseek.r1')) {\n toolSupport = true;\n streaming = false;\n }\n else if (model.startsWith('openai.gpt-') || model.startsWith('xai.grok-')) {\n toolSupport = true;\n streaming = true;\n }\n else if (isFamilyVersionGte(model, 'google.gemma-', 4)) {\n // Later Gemma generations inherit the newest verified Bedrock tool behavior.\n toolSupport = true;\n streaming = true;\n }\n else if (includesAny(model, ['mistral.mistral-large', 'mistral.pixtral'])) {\n toolSupport = true;\n }\n else if (model.includes('twelvelabs.pegasus')) {\n toolSupport = true;\n }\n else if (model.includes('writer.palmyra')) {\n toolSupport = true;\n }\n if (toolSupport === undefined)\n return {};\n return { tool_support: toolSupport, tool_support_streaming: toolSupport && streaming };\n}\nexport function getBedrockModelKnowledge(model) {\n const modelId = normalizeBedrockModelId(model);\n return { ...getModalities(modelId), ...getLimits(modelId) };\n}\nexport function getBedrockModelCapabilities(model, endpoint) {\n const modelId = normalizeBedrockModelId(model);\n const knowledge = getBedrockModelKnowledge(modelId);\n // AWS documents client-side tool calling for Nemotron on Mantle, but not Bedrock Runtime tool use.\n const sourceToolSupport = endpoint === 'mantle' && modelId.startsWith('nvidia.nemotron-')\n ? { tool_support: true }\n : getRuntimeToolSupport(modelId);\n // Mantle can stream tool calls, but its protocol alone does not give every hosted source model tool support.\n // Preserve false/unknown source semantics and relax only a known-positive runtime streaming restriction.\n const toolSupport = endpoint === 'mantle' && sourceToolSupport.tool_support === true\n ? { ...sourceToolSupport, tool_support_streaming: true }\n : sourceToolSupport;\n return {\n input: knowledge.input,\n output: knowledge.output,\n ...toolSupport,\n };\n}\n//# sourceMappingURL=bedrock-models.js.map","function datedVersionGte(model, family, target) {\n const match = model.match(new RegExp(`${family}(\\\\d{4})(?:[-_.]|$)`));\n return !!match && Number(match[1]) >= target;\n}\nfunction semanticVersionGte(model, family, targetMajor, targetMinor = 0) {\n const match = model.match(new RegExp(`${family}(\\\\d+)(?:[-.](\\\\d+))?(?:[-_.]|$)`));\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nfunction isMistralSmall4OrLater(model) {\n return (model.includes('mistral-small-latest') ||\n datedVersionGte(model, 'mistral-small-', 2603) ||\n semanticVersionGte(model, 'mistral-small-', 4));\n}\nfunction isMistralMedium35OrLater(model) {\n return (model.includes('mistral-medium-latest') ||\n datedVersionGte(model, 'mistral-medium-', 2604) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 5));\n}\nexport function isMistralAdjustableReasoningModel(model) {\n const normalized = model.toLowerCase();\n return isMistralSmall4OrLater(normalized) || isMistralMedium35OrLater(normalized);\n}\nfunction hasMistralVision(model) {\n return (model.includes('pixtral') ||\n model.includes('mistral-small-latest') ||\n datedVersionGte(model, 'mistral-small-', 2503) ||\n semanticVersionGte(model, 'mistral-small-', 3, 1) ||\n model.includes('mistral-medium-latest') ||\n datedVersionGte(model, 'mistral-medium-', 2508) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 1) ||\n model.includes('mistral-large-latest') ||\n datedVersionGte(model, 'mistral-large-', 2512) ||\n semanticVersionGte(model, 'mistral-large-', 3) ||\n /ministral-(?:3|8|14)b-(?:latest|\\d{4})(?:[-_.]|$)/.test(model));\n}\nfunction getMistralContextWindow(model) {\n if (model.includes('voxtral-small') || model.includes('voxtral-mini'))\n return 32_000;\n if (model.includes('magistral-')) {\n const version = model.match(/magistral-(?:small|medium)-(\\d{4})(?:[-_.]|$)/)?.[1];\n return model.includes('latest') || (version && Number(version) >= 2509) ? 128_000 : 40_000;\n }\n if (isMistralSmall4OrLater(model) ||\n isMistralMedium35OrLater(model) ||\n model.includes('mistral-large-latest') ||\n datedVersionGte(model, 'mistral-large-', 2512) ||\n semanticVersionGte(model, 'mistral-large-', 3) ||\n /ministral-(?:3|8|14)b-(?:latest|\\d{4})(?:[-_.]|$)/.test(model) ||\n model.includes('devstral-2') ||\n model.includes('leanstral')) {\n return 256_000;\n }\n if (datedVersionGte(model, 'mistral-small-', 2503) ||\n semanticVersionGte(model, 'mistral-small-', 3, 1) ||\n datedVersionGte(model, 'mistral-medium-', 2508) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 1) ||\n model.includes('mistral-nemo') ||\n model.includes('open-mistral-nemo') ||\n model.includes('codestral') ||\n model.includes('pixtral')) {\n return 128_000;\n }\n if (/mistral-(?:small|medium|large)-24\\d{2}/.test(model) || model.includes('open-mistral-7b')) {\n return 32_000;\n }\n return undefined;\n}\nexport function getMistralModelKnowledge(model) {\n const normalized = model.toLowerCase();\n if (normalized.includes('moderation') || normalized.includes('shieldstral')) {\n return {\n capabilities: {\n input: { text: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('mistral-ocr')) {\n return {\n capabilities: {\n input: { text: true, image: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('tts')) {\n return {\n capabilities: {\n input: { text: true },\n output: { audio: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('voxtral-mini') && /(transcribe|realtime)/.test(normalized)) {\n return {\n capabilities: {\n input: { audio: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n const adjustableReasoning = isMistralAdjustableReasoningModel(normalized);\n const voxtralMini = normalized.includes('voxtral-mini');\n return {\n capabilities: {\n input: {\n text: true,\n image: hasMistralVision(normalized) || undefined,\n audio: normalized.includes('voxtral-small') || voxtralMini || undefined,\n },\n output: { text: true },\n tool_support: !voxtralMini,\n tool_support_streaming: !voxtralMini,\n },\n context_window: getMistralContextWindow(normalized),\n ...(adjustableReasoning && { reasoning_effort_levels: ['none', 'high'] }),\n };\n}\n//# sourceMappingURL=mistral.js.map","// Record of OpenAI model capabilities keyed by model ID (lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'chatgpt-4o-latest': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\n// For OpenAI, tool_support_streaming matches tool_support since the API supports tools while streaming\nconst RECORD_FAMILY_CAPABILITIES = {\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-3.5': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4-turbo': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'chatgpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'dall-e': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'o1-preview': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'omni-moderation': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n sora: {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: true, embed: false },\n tool_support: false,\n },\n 'text-embedding': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n tool_support: false,\n },\n 'text-moderation': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n whisper: {\n input: { text: false, image: false, video: false, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = ['tool', 'gpt', 'gpt-5', 'o1', 'o3', 'o4'];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeOpenAIModelName(modelName) {\n return modelName.toLowerCase();\n}\n/**\n * Get the full ModelCapabilities for an OpenAI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n * For OpenAI models, tool_support_streaming defaults to tool_support since the API supports tools while streaming.\n */\nexport function getModelCapabilitiesOpenAI(model) {\n const normalized = normalizeOpenAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...record,\n tool_support_streaming: record.tool_support_streaming ?? record.tool_support,\n };\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n const family = RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...family,\n tool_support_streaming: family.tool_support_streaming ?? family.tool_support,\n };\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n // Default tool_support_streaming to tool_support for OpenAI models\n return { input, output, tool_support, tool_support_streaming: tool_support };\n}\n//# sourceMappingURL=openai.js.map","import { isModelFamilyVersionGTE } from '../options/version-parsing.js';\n// Record of Vertex AI model capabilities keyed by model ID (last path segment, lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'gemini-2.0-flash-lite-001': {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemma-4-26b-a4b-it-maas': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Default family capabilities intentionally describe the latest known behavior for a model family.\n// Newer Vertex models should inherit these defaults by prefix until proven otherwise; add model-specific\n// records above only for older variants or materially different models that do not match the family default.\nconst RECORD_FAMILY_CAPABILITIES = {\n gemini: {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gemini-3.1-flash-image': {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-2.5-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-pro-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n imagen: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n claude: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-2': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n grok: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n gemma: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n glm: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n kimi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n minimax: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n qwen: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'sonnet',\n 'opus',\n 'gemini',\n 'claude',\n 'grok',\n 'deepseek',\n 'gemma',\n 'glm',\n 'gpt-oss',\n 'kimi',\n 'llama',\n 'minimax',\n 'qwen',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeVertexAIModelName(modelName) {\n const segments = modelName.toLowerCase().split('/');\n return segments[segments.length - 1];\n}\n/**\n * Get the full ModelCapabilities for a Vertex AI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesVertexAI(model) {\n const normalized = normalizeVertexAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record)\n return record;\n if (isModelFamilyVersionGTE(normalized, 'llama-', 4, 0) || isModelFamilyVersionGTE(normalized, 'llama', 4, 0)) {\n // New Llama generations inherit the latest known MaaS family capabilities until a model-specific exception\n // is documented above.\n return RECORD_FAMILY_CAPABILITIES['llama-4'];\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=vertexai.js.map","import { getMistralModelKnowledge } from '../capability/mistral.js';\nimport { isClaudeVersionGTE, isModelFamilyVersionGTE, isOpenAIGptProModel, isOpenAIGptVersionGTE, parseOpenAIGptVersion, } from './version-parsing.js';\nfunction isDeepSeekV32OrLater(model) {\n return isModelFamilyVersionGTE(model, 'deepseek.v', 3, 2) || isModelFamilyVersionGTE(model, 'deepseek-v', 3, 2);\n}\n/**\n * Returns the max output tokens for a given model (provider-agnostic).\n * When a model's limits vary by provider, returns a conservative value\n * that works across all providers.\n */\nexport function getMaxOutputTokens(model) {\n model = model.toLowerCase();\n // Claude models\n if (model.includes('claude')) {\n if (isClaudeVersionGTE(model, 4, 7))\n return 128_000;\n if (model.includes('opus-4-6'))\n return 128_000;\n if (model.includes('opus-4-5'))\n return 64_000;\n if (model.includes('opus-'))\n return 32_000; // Opus 4.0, 4.1\n if (model.includes('-4-'))\n return 64_000; // Sonnet 4.x, Haiku 4.5\n if (model.includes('-3-7'))\n return 64_000; // 128K with beta header, default 64K\n if (model.includes('-3-5'))\n return 8_192;\n return 4_096; // Claude 3 older\n }\n // Gemini models\n if (model.includes('gemini')) {\n if (model.includes('-1.0-'))\n return 2_048;\n if (model.includes('flash-image') || model.includes('pro-image'))\n return 32_768;\n return 65_535; // Gemini 1.5, 2.0, 2.5, 3 — API upper bound is exclusive\n }\n // OpenAI o-series\n if (model.includes('o1-mini'))\n return 65_536;\n if (model.includes('o1'))\n return 100_000;\n if (/(?:^|[~/.])o\\d+(?:[-_.]|$)/.test(model.toLowerCase()))\n return 100_000;\n // GPT models\n const gptVersion = parseOpenAIGptVersion(model);\n if (model.includes('gpt-5-chat-latest'))\n return 16_384;\n if (isOpenAIGptProModel(model) && gptVersion?.major === 5 && gptVersion.minor === 0)\n return 272_000;\n if (isOpenAIGptVersionGTE(model, 5, 0))\n return 128_000;\n if (model.includes('gpt-oss'))\n return 16_384;\n if (model.includes('gpt-4o'))\n return 16_384;\n if (model.includes('gpt-4'))\n return 8_192;\n if (model.includes('gpt-3.5'))\n return 4_096;\n // Grok\n if (isModelFamilyVersionGTE(model, 'grok-', 4, 3))\n return 131_072;\n // Amazon Nova\n if (model.includes('nova'))\n return 10_000;\n // Mistral\n if (model.includes('mistral'))\n return 8_192;\n // DeepSeek\n if (model.includes('deepseek-r1-0528'))\n return 32_768;\n if (isDeepSeekV32OrLater(model))\n return 65_536;\n if (model.includes('deepseek'))\n return 128_000;\n // Qwen\n if (model.includes('qwen3-next'))\n return 262_144;\n if (model.includes('qwen3-coder'))\n return 65_536;\n if (model.includes('qwen'))\n return 32_768;\n // Kimi\n if (model.includes('kimi-k2-thinking'))\n return 262_144;\n // MiniMax\n if (model.includes('minimax-m2'))\n return 196_608;\n // ZAI GLM\n if (model.includes('glm-'))\n return 32_768;\n // Gemma\n if (model.includes('gemma-4'))\n return 128_000;\n // Llama\n if (model.includes('llama'))\n return 8_192;\n // Cohere\n if (model.includes('command-a'))\n return 8_000;\n if (model.includes('command'))\n return 4_096;\n return 8_192; // conservative default\n}\n/**\n * Returns the max input tokens for a known model (context window minus max output), or undefined when the context\n * window is not known.\n */\nexport function getMaxInputTokens(model) {\n const contextWindow = getContextWindowSize(model);\n return contextWindow === undefined ? undefined : contextWindow - getMaxOutputTokens(model);\n}\n/**\n * Returns the known context window size (input + output), or undefined rather than guessing for an unknown model.\n */\nexport function getContextWindowSize(model) {\n model = model.toLowerCase();\n // Claude models\n if (model.includes('claude')) {\n if (isClaudeVersionGTE(model, 4, 7))\n return 1_000_000;\n return 200_000;\n }\n // Gemini models\n if (model.includes('gemini')) {\n if (model.includes('-1.0-'))\n return 32_000;\n return 1_000_000; // Gemini 1.5, 2.0, 2.5, 3 all support 1M\n }\n // OpenAI o-series (check before gpt-4 to avoid false matches)\n if (/(?:^|[~/.])o\\d+(?:[-_.]|$)/.test(model.toLowerCase()))\n return 200_000;\n // GPT models — provider-specific limits are applied by the provider overlay.\n if (model.includes('gpt-5-chat-latest'))\n return 128_000;\n if (model.includes('gpt-5.4-mini') || model.includes('gpt-5.4-nano'))\n return 400_000;\n if (isOpenAIGptVersionGTE(model, 5, 4))\n return 1_050_000;\n if (isOpenAIGptVersionGTE(model, 5, 0))\n return 400_000;\n if (model.includes('gpt-oss'))\n return 131_072;\n if (model.includes('gpt-4.1') || model.includes('gpt-4-1'))\n return 1_000_000;\n if (model.includes('gpt-4-turbo') || model.includes('gpt-4o'))\n return 128_000;\n if (model.includes('gpt-4'))\n return 8_000;\n if (model.includes('gpt-3.5'))\n return 16_000;\n // Grok\n if (isModelFamilyVersionGTE(model, 'grok-', 4, 3))\n return 1_000_000;\n if (model.includes('grok-4.1') || model.includes('grok-4-1'))\n return 256_000;\n if (model.includes('grok'))\n return 131_072;\n // Amazon Nova\n if (model.includes('nova'))\n return 300_000;\n // Mistral\n if (/(?:mistral|mixtral|ministral|magistral|voxtral|codestral|devstral|leanstral|mathstral|pixtral)/.test(model)) {\n return getMistralModelKnowledge(model).context_window;\n }\n // DeepSeek\n if (isDeepSeekV32OrLater(model))\n return 163_840;\n if (model.includes('deepseek-r1-0528'))\n return 163_840;\n if (model.includes('deepseek'))\n return 128_000;\n // Qwen\n if (model.includes('qwen3-next'))\n return 262_144;\n if (model.includes('qwen3-coder'))\n return 262_144;\n if (model.includes('qwen'))\n return 262_144;\n // Kimi\n if (model.includes('kimi-k2-thinking'))\n return 262_144;\n // MiniMax\n if (model.includes('minimax-m2'))\n return 196_608;\n // ZAI GLM\n if (model.includes('glm-'))\n return 128_000;\n // Gemma\n if (model.includes('gemma-4'))\n return 256_000;\n // Llama\n if (isModelFamilyVersionGTE(model, 'llama-', 4, 0) || isModelFamilyVersionGTE(model, 'llama', 4, 0)) {\n return model.includes('scout') ? 10_000_000 : 1_000_000;\n }\n if (model.includes('llama-3.1') || model.includes('llama-3.2') || model.includes('llama-3.3'))\n return 128_000;\n if (model.includes('llama'))\n return 8_000;\n // Cohere\n if (model.includes('command-a'))\n return 256_000;\n if (model.includes('command'))\n return 128_000;\n return undefined;\n}\n//# sourceMappingURL=context-windows.js.map","// ============== Provider details ===============\nexport var Providers;\n(function (Providers) {\n Providers[\"openai\"] = \"openai\";\n Providers[\"openai_compatible\"] = \"openai_compatible\";\n Providers[\"azure_openai\"] = \"azure_openai\";\n Providers[\"azure_foundry\"] = \"azure_foundry\";\n Providers[\"huggingface_ie\"] = \"huggingface_ie\";\n Providers[\"replicate\"] = \"replicate\";\n Providers[\"bedrock\"] = \"bedrock\";\n Providers[\"bedrock_mantle\"] = \"bedrock_mantle\";\n Providers[\"vertexai\"] = \"vertexai\";\n Providers[\"togetherai\"] = \"togetherai\";\n Providers[\"mistralai\"] = \"mistralai\";\n Providers[\"groq\"] = \"groq\";\n Providers[\"watsonx\"] = \"watsonx\";\n Providers[\"xai\"] = \"xai\";\n Providers[\"anthropic\"] = \"anthropic\";\n})(Providers || (Providers = {}));\nexport const ProviderList = {\n openai: {\n id: Providers.openai,\n name: 'OpenAI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n azure_openai: {\n id: Providers.azure_openai,\n name: 'Azure OpenAI',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n azure_foundry: {\n id: Providers.azure_foundry,\n name: 'Microsoft Foundry',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n huggingface_ie: {\n id: Providers.huggingface_ie,\n name: 'HuggingFace Inference Endpoint',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n },\n replicate: {\n id: Providers.replicate,\n name: 'Replicate',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: true,\n },\n bedrock: {\n id: Providers.bedrock,\n name: 'Amazon Bedrock',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n endpointPlaceholder: 'region name (eg. us-east-1)',\n supportSearch: false,\n },\n bedrock_mantle: {\n id: Providers.bedrock_mantle,\n name: 'Amazon Bedrock Mantle',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'region name (eg. us-west-2)',\n supportSearch: false,\n },\n vertexai: {\n id: Providers.vertexai,\n name: 'Google Agent Platform (Vertex AI)',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n togetherai: {\n id: Providers.togetherai,\n name: 'Together AI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n mistralai: {\n id: Providers.mistralai,\n name: 'Mistral AI',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n groq: {\n id: Providers.groq,\n name: 'Groq Cloud',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n watsonx: {\n id: Providers.watsonx,\n name: 'IBM WatsonX',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n xai: {\n id: Providers.xai,\n name: 'xAI (Grok)',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n openai_compatible: {\n id: Providers.openai_compatible,\n name: 'OpenAI Compatible',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'https://api.example.com/v1',\n supportSearch: false,\n },\n anthropic: {\n id: Providers.anthropic,\n name: 'Anthropic',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\n/**\n * Standardized error class for Llumiverse driver errors.\n *\n * Normalizes errors from different LLM providers (OpenAI, Anthropic, Bedrock, VertexAI, etc.)\n * into a consistent format. The primary value is the `retryable` flag, which enables upstream\n * consumers to implement smart retry logic.\n *\n * @example\n * ```typescript\n * try {\n * const result = await driver.execute(segments, options);\n * } catch (error) {\n * if (LlumiverseError.isLlumiverseError(error)) {\n * console.log(`Provider: ${error.context.provider}`);\n * console.log(`Model: ${error.context.model}`);\n * console.log(`Retryable: ${error.retryable}`);\n *\n * if (error.retryable) {\n * // Implement retry logic with exponential backoff\n * await retryWithBackoff(() => driver.execute(segments, options));\n * } else {\n * // Handle non-retryable error (e.g., invalid API key, malformed request)\n * logError(error);\n * }\n * }\n * throw error;\n * }\n * ```\n */\nexport class LlumiverseError extends Error {\n /**\n * HTTP status code (e.g., 429, 500) if available.\n * Undefined if the error doesn't have a numeric status code.\n */\n code;\n /**\n * Provider-specific error name/type (e.g., \"ThrottlingException\", \"ValidationException\").\n * Optional - used to preserve the semantic error type from the provider SDK.\n */\n name;\n /**\n * Whether this error is retryable.\n * - True: Definitely retryable (rate limits, timeouts, server errors)\n * - False: Definitely not retryable (auth failures, invalid requests, malformed schemas)\n * - Undefined: Unknown retryability - allows consumers to decide default behavior\n *\n * When undefined, consumers can choose their retry strategy:\n * - Conservative: Don't retry unknown errors (avoid spam)\n * - Resilient: Retry unknown errors (prioritize success)\n */\n retryable;\n /**\n * Context about where and how the error occurred.\n * Includes provider, model, operation type.\n */\n context;\n /**\n * The original error from the provider SDK.\n * Preserved for debugging and detailed error inspection.\n */\n originalError;\n constructor(message, retryable, context, originalError, code, name) {\n super(message);\n this.name = name || 'LlumiverseError';\n this.code = code;\n this.retryable = retryable;\n this.context = context;\n this.originalError = originalError;\n // Preserve stack trace from original error if available\n if (originalError instanceof Error && originalError.stack) {\n this.stack = originalError.stack;\n }\n }\n /**\n * Serialize the error to JSON for logging or transmission.\n * Includes all error properties except the original error object itself.\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n retryable: this.retryable,\n context: this.context,\n stack: this.stack,\n // Include original error message if available\n originalErrorMessage: this.originalError instanceof Error ? this.originalError.message : String(this.originalError),\n };\n }\n /**\n * Type guard to check if an error is a LlumiverseError.\n * Useful for conditional error handling.\n *\n * @param error - The error to check\n * @returns True if the error is a LlumiverseError\n */\n static isLlumiverseError(error) {\n return error instanceof LlumiverseError;\n }\n}\n/** Namespace used by agent conversations that require stable Claude cache layout. */\nexport const AGENT_PROMPT_CACHE_KEY_PREFIX = 'agent-';\n/** Stable prefixes shared by prompt generators and cached-conversation deduplication. */\nexport const JSON_SCHEMA_INSTRUCTION_PREFIX = 'The answer must be a JSON object using the following JSON Schema:';\nexport const TOOL_AWARE_JSON_SCHEMA_INSTRUCTION_PREFIX = 'When not calling tools, the answer must be a JSON object using the following JSON Schema:';\n//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n SharedOptions[\"effort\"] = \"effort\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n OptionType[\"json_object\"] = \"json_object\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\n/**\n * @deprecated This is deprecated. Use CompletionResult.type information instead.\n */\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { getModelCapabilitiesAnthropic } from './capability/anthropic.js';\nimport { getModelCapabilitiesAzureFoundry } from './capability/azure_foundry.js';\nimport { getBedrockModelCapabilities, getBedrockModelKnowledge } from './capability/bedrock-models.js';\nimport { getMistralModelKnowledge } from './capability/mistral.js';\nimport { getModelCapabilitiesOpenAI } from './capability/openai.js';\nimport { getModelCapabilitiesVertexAI } from './capability/vertexai.js';\nimport { getContextWindowSize, getMaxOutputTokens } from './options/context-windows.js';\nimport { getOpenAIReasoningEffortLevels, isGeminiModelVersionGte, isModelFamilyVersionGTE, } from './options/version-parsing.js';\nimport { Providers } from './types.js';\nconst EXACT_MODEL_OVERRIDES = {\n 'chat-latest': {\n family: 'gpt',\n source_provider: 'openai',\n context_window: 400_000,\n max_output_tokens: 128_000,\n },\n // OpenAI image endpoints are not text inference models even though their IDs contain `gpt`.\n 'gpt-image-1': {\n family: 'image',\n capabilities: {\n input: { text: true, image: true, audio: false, video: false },\n output: { text: false, image: true, audio: false, video: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n },\n 'gpt-realtime-translate': {\n family: 'realtime',\n context_window: 16_000,\n max_output_tokens: 2_000,\n capabilities: {\n input: { text: false, image: false, audio: true, video: false },\n output: { text: true, image: false, audio: true, video: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n },\n 'gpt-5-chat-latest': {\n family: 'gpt',\n source_provider: 'openai',\n context_window: 128_000,\n max_output_tokens: 16_384,\n },\n};\nconst GENERIC_CAPABILITIES = {\n input: { text: true },\n output: { text: true },\n};\nfunction normalizeSourceModelId(model) {\n const normalized = model.trim().toLowerCase().replace(/^~/, '');\n // Azure Foundry uses deployment::source-model. Resolve family semantics from the source half, not the\n // customer-chosen deployment name, before applying transport behavior.\n const sourceQualified = normalized.includes('::') ? (normalized.split('::').pop() ?? normalized) : normalized;\n const slash = sourceQualified.lastIndexOf('/');\n const leaf = slash === -1 ? sourceQualified : sourceQualified.slice(slash + 1);\n return leaf.replace(/^(?:global|us|eu|apac)\\./, '').replace(/^(?:openai|anthropic|google|xai)\\./, '');\n}\nfunction getModelAliases(model) {\n const normalized = model.trim().toLowerCase();\n const aliases = [normalized, normalizeSourceModelId(normalized)];\n return [...new Set(aliases)];\n}\nfunction inferFamily(model) {\n const normalized = normalizeSourceModelId(model);\n if (/(^|[-_.:])(?:embed|embedding|vector)(?:[-_.:]|$)/.test(normalized)) {\n return { family: 'embedding' };\n }\n if (/(?:prompt-guard|moderation|safeguard)/.test(normalized))\n return { family: 'moderation' };\n if (normalized.includes('grok') && normalized.includes('image')) {\n return { family: 'image', source_provider: 'xai' };\n }\n if (normalized.includes('gpt-image') || normalized.includes('dall-e') || normalized.includes('imagen-')) {\n return { family: 'image', source_provider: normalized.includes('imagen') ? 'google' : 'openai' };\n }\n if (/(?:whisper|transcribe)/.test(normalized))\n return { family: 'transcription', source_provider: 'openai' };\n if (/(?:^|[-_.])tts(?:[-_.]|$)/.test(normalized))\n return { family: 'speech', source_provider: 'openai' };\n if (normalized.includes('realtime'))\n return { family: 'realtime', source_provider: 'openai' };\n if (/(?:^|[-_.])audio(?:[-_.]|$)/.test(normalized))\n return { family: 'audio', source_provider: 'openai' };\n if (normalized.includes('sora'))\n return { family: 'video', source_provider: 'openai' };\n if (normalized.includes('gemini'))\n return { family: 'gemini', source_provider: 'google' };\n if (normalized.includes('claude'))\n return { family: 'claude', source_provider: 'anthropic' };\n if (normalized.includes('gpt') || /^o\\d+(?:[-_.]|$)/.test(normalized)) {\n return { family: 'gpt', source_provider: 'openai' };\n }\n if (normalized.includes('grok'))\n return { family: 'grok', source_provider: 'xai' };\n if (normalized.includes('nemotron'))\n return { family: 'nemotron', source_provider: 'nvidia' };\n if (/(?:mistral|mixtral|ministral|magistral|voxtral|codestral|devstral|leanstral|mathstral|pixtral)/.test(normalized)) {\n return { family: 'mistral', source_provider: 'mistralai' };\n }\n for (const family of ['llama', 'qwen', 'deepseek', 'gemma', 'mistral', 'kimi', 'minimax', 'glm']) {\n if (normalized.includes(family))\n return { family };\n }\n return { family: 'generic' };\n}\nfunction getCanonicalCapabilities(model, family) {\n switch (family) {\n case 'gemini':\n return getModelCapabilitiesVertexAI(model);\n case 'claude':\n return getModelCapabilitiesAnthropic(model);\n case 'gpt': {\n const capabilities = getModelCapabilitiesOpenAI(model);\n return {\n ...capabilities,\n input: {\n ...capabilities.input,\n text: capabilities.input.text ?? true,\n image: capabilities.input.image ?? true,\n },\n output: {\n ...capabilities.output,\n text: capabilities.output.text ?? true,\n },\n tool_support: capabilities.tool_support ?? true,\n tool_support_streaming: capabilities.tool_support_streaming ?? capabilities.tool_support ?? true,\n };\n }\n case 'embedding':\n return {\n input: { text: true },\n output: { embed: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'moderation':\n return {\n input: { text: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'transcription':\n return {\n input: { audio: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'speech':\n return {\n input: { text: true },\n output: { audio: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'realtime':\n return {\n input: { text: true, image: true, audio: true },\n output: { text: true, audio: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'audio':\n return {\n input: { text: true, audio: true },\n output: { text: true, audio: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'video':\n return {\n input: { text: true, image: true, video: true },\n output: { video: true, audio: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'image':\n return { input: { text: true, image: true }, output: { image: true }, tool_support: false };\n case 'grok':\n return {\n input: {\n text: true,\n image: model.includes('vision') || isModelFamilyVersionGTE(model, 'grok-', 4, 3),\n },\n output: { text: true },\n tool_support: true,\n };\n case 'llama':\n return {\n // Future Llama generations inherit the newest known family behavior until a provider documents\n // a narrower exception.\n input: { text: true, image: model.includes('vision') || isLlamaVersionGte(model, 4) },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'gemma': {\n const normalized = model.toLowerCase();\n const image = (normalized.includes('gemma-3') &&\n !normalized.includes('gemma-3-1b') &&\n !normalized.includes('gemma-3-270m')) ||\n normalized.includes('gemma-4');\n return {\n input: { text: true, image },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n }\n case 'qwen': {\n const normalized = model.toLowerCase();\n const qwenVision = normalized.includes('qwen3.5') ||\n ['qwen2.5', 'qwen3'].some((familyPrefix) => {\n const familyIndex = normalized.indexOf(familyPrefix);\n if (familyIndex === -1)\n return false;\n const suffix = normalized.slice(familyIndex + familyPrefix.length);\n return suffix.includes('-vl') || suffix.includes('.vl');\n });\n return {\n input: { text: true, image: qwenVision },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n }\n case 'deepseek':\n case 'kimi':\n case 'minimax':\n case 'glm':\n return { input: { text: true }, output: { text: true }, tool_support: true, tool_support_streaming: true };\n case 'nemotron':\n return {\n input: { text: true, image: model.includes('nemotron-nano-12b') },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'mistral':\n return getMistralModelKnowledge(model).capabilities;\n default:\n return { ...GENERIC_CAPABILITIES, input: { ...GENERIC_CAPABILITIES.input } };\n }\n}\nfunction isLlamaVersionGte(model, targetMajor) {\n return (isModelFamilyVersionGTE(model, 'llama-', targetMajor, 0) ||\n isModelFamilyVersionGTE(model, 'llama', targetMajor, 0));\n}\nfunction mergeCapabilities(base, override) {\n if (!override)\n return base;\n return {\n ...base,\n ...override,\n input: { ...base.input, ...override.input },\n output: { ...base.output, ...override.output },\n };\n}\nfunction getCanonicalLimits(sourceModel, family) {\n // Profiles only expose limits backed by known family data so option UIs do not present guesses as authoritative.\n if (family === 'audio')\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (family === 'realtime' && isModelFamilyVersionGTE(sourceModel, 'gpt-realtime-', 2, 0)) {\n // Future Realtime generations inherit the latest documented family limits until a narrower rule is known.\n return { context_window: 128_000, max_output_tokens: 32_000 };\n }\n if (family === 'gemini' && sourceModel.includes('gemini-3.1-flash-image')) {\n return { context_window: 131_072, max_output_tokens: 32_768 };\n }\n if (family === 'nemotron') {\n if (sourceModel.includes('nemotron-super-'))\n return { context_window: 256_000, max_output_tokens: 32_768 };\n const generation = sourceModel.match(/nemotron-nano-(\\d+)-/)?.[1];\n return {\n context_window: generation && Number(generation) >= 3 ? 256_000 : 128_000,\n max_output_tokens: 8_192,\n };\n }\n if (['generic', 'embedding', 'moderation', 'image', 'transcription', 'speech', 'realtime', 'video'].includes(family)) {\n return {};\n }\n if (family === 'mistral') {\n return { context_window: getMistralModelKnowledge(sourceModel).context_window };\n }\n return {\n context_window: getContextWindowSize(sourceModel),\n max_output_tokens: getMaxOutputTokens(sourceModel),\n };\n}\nfunction applyProviderOverlay(model, sourceModel, family, provider, capabilities) {\n if (provider === Providers.bedrock) {\n const bedrock = getBedrockModelCapabilities(model, 'runtime');\n const knowledge = getBedrockModelKnowledge(model);\n return { capabilities: bedrock, ...knowledge };\n }\n if (provider === Providers.bedrock_mantle) {\n const bedrock = getBedrockModelCapabilities(model, 'mantle');\n const knowledge = getBedrockModelKnowledge(model);\n return { capabilities: bedrock, ...knowledge };\n }\n // OpenRouter and other OpenAI-compatible transports retain the source model's semantic\n // capabilities, but cannot expose provider-native fields such as Vertex Flex or thinking_level.\n if (provider === Providers.openai_compatible) {\n return {\n capabilities: {\n ...capabilities,\n tool_support_streaming: capabilities.tool_support_streaming ?? capabilities.tool_support,\n },\n ...getCanonicalLimits(sourceModel, family),\n };\n }\n if (provider === Providers.azure_foundry) {\n // Deployment metadata describes the transport. Dedicated source endpoints keep their source modalities so a\n // deployment named like a GPT model cannot become text inference accidentally.\n const providerCapabilities = getModelCapabilitiesAzureFoundry(model);\n return {\n capabilities: [\n 'embedding',\n 'moderation',\n 'image',\n 'transcription',\n 'speech',\n 'realtime',\n 'audio',\n 'video',\n ].includes(family)\n ? capabilities\n : providerCapabilities,\n ...getCanonicalLimits(sourceModel, family),\n };\n }\n return {\n capabilities,\n ...getCanonicalLimits(sourceModel, family),\n };\n}\nfunction getReasoningEffortLevels(model, family, provider) {\n if (family === 'gpt') {\n if (model.includes('gpt-oss')) {\n return provider === Providers.togetherai ||\n provider === Providers.openai_compatible ||\n provider === Providers.vertexai ||\n provider === Providers.bedrock ||\n provider === Providers.bedrock_mantle ||\n provider === Providers.azure_foundry\n ? ['low', 'medium', 'high']\n : undefined;\n }\n if (provider === Providers.openai ||\n provider === Providers.azure_openai ||\n provider === Providers.openai_compatible ||\n provider === Providers.azure_foundry ||\n provider === Providers.bedrock_mantle) {\n if (/^o\\d+(?:[-_.]|$)/.test(model))\n return ['low', 'medium', 'high'];\n return Object.values(getOpenAIReasoningEffortLevels(model) ?? {});\n }\n return undefined;\n }\n if (family === 'gemini' && provider === Providers.openai_compatible && isGeminiModelVersionGte(model, '3.5')) {\n return ['minimal', 'low', 'medium', 'high'];\n }\n if (provider === Providers.mistralai && family === 'mistral') {\n return getMistralModelKnowledge(model).reasoning_effort_levels;\n }\n if (provider === Providers.xai && family === 'grok') {\n const grok420Index = model.indexOf('grok-4.20');\n if (grok420Index !== -1 && model.indexOf('multi-agent', grok420Index + 'grok-4.20'.length) !== -1) {\n return ['low', 'medium', 'high', 'xhigh'];\n }\n if (isSingleDigitGrokVersionGte(model, 4, 5))\n return ['low', 'medium', 'high'];\n if (isSingleDigitGrokVersionGte(model, 4, 3))\n return ['none', 'low', 'medium', 'high'];\n }\n return undefined;\n}\nfunction isSingleDigitGrokVersionGte(model, targetMajor, targetMinor) {\n const match = model.match(/grok-(\\d+)(?:\\.(\\d))?(?:[-_.]|$)/);\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nexport function resolveModelProfile(model, provider) {\n const canonical_id = normalizeSourceModelId(model);\n const exactOverride = EXACT_MODEL_OVERRIDES[canonical_id];\n // Family identity follows the normalized source model. Transport paths and customer deployment names must not\n // accidentally select a different family rule.\n const inferred = inferFamily(canonical_id);\n const family = exactOverride?.family ?? inferred.family;\n const source_provider = exactOverride?.source_provider ?? inferred.source_provider;\n const canonicalCapabilities = getCanonicalCapabilities(canonical_id, family);\n const vertexCapabilities = provider === Providers.vertexai ? getModelCapabilitiesVertexAI(model) : undefined;\n const hasVertexCapabilities = vertexCapabilities &&\n (Object.values(vertexCapabilities.input).some((value) => value === true) ||\n Object.values(vertexCapabilities.output).some((value) => value === true) ||\n vertexCapabilities.tool_support !== undefined);\n const baseCapabilities = hasVertexCapabilities ? vertexCapabilities : canonicalCapabilities;\n const overlay = applyProviderOverlay(model, canonical_id, family, provider, baseCapabilities);\n const reasoningEffortLevels = getReasoningEffortLevels(canonical_id, family, provider);\n return {\n model_id: model,\n canonical_id,\n family,\n source_provider,\n // Exact source-model semantics win after transport overlays. Provider inference must not turn a dedicated\n // image or other non-chat endpoint into a text model merely because its ID resembles a known family.\n capabilities: mergeCapabilities(overlay.capabilities, exactOverride?.capabilities),\n context_window: exactOverride?.context_window ?? overlay.context_window,\n max_output_tokens: exactOverride?.max_output_tokens ?? overlay.max_output_tokens,\n ...(reasoningEffortLevels?.length && { reasoning_effort_levels: reasoningEffortLevels }),\n };\n}\nexport function isModelDirectoryEmbedding(model) {\n const aliases = getModelAliases(model);\n return aliases.some((alias) => /(^|[-_.:])(?:embed|embedding|vector)(?:[-_.:]|$)/.test(alias));\n}\n//# sourceMappingURL=model-directory.js.map","import { isModelDirectoryEmbedding, resolveModelProfile } from './model-directory.js';\nexport function getModelCapabilities(model, provider) {\n //Check for locations/<location>/ prefix and remove it\n if (model.startsWith('locations/')) {\n const parts = model.split('/');\n if (parts.length >= 3) {\n model = parts.slice(2).join('/');\n }\n }\n const modelName = model.split('/').pop()?.toLowerCase();\n if (provider === 'vertexai' && modelName === 'gemini-omni-flash-preview') {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n const capabilities = resolveModelProfile(model, provider).capabilities;\n // The platform accepts audio/video inputs but cannot return those modalities yet. Keep source output metadata in\n // the directory so enabling output support later only requires removing this execution-path mask.\n return {\n ...capabilities,\n input: { ...capabilities.input },\n output: { ...capabilities.output, audio: false, video: false },\n };\n}\nexport function supportsToolUse(model, provider, streaming = false) {\n const capabilities = getModelCapabilities(model, provider);\n if (!streaming) {\n return !!capabilities.tool_support;\n }\n // Unset tool_support_streaming means \"same as tool_support\" (OpenAI-compatible default).\n // Only an explicit false opts out of tools-while-streaming.\n return !!(capabilities.tool_support_streaming ?? capabilities.tool_support);\n}\nexport function modelModalitiesToArray(modalities) {\n return Object.entries(modalities)\n .filter(([_, isSupported]) => isSupported)\n .map(([modality]) => modality);\n}\n/** Dedicated endpoint models are not executable through the standard inference path. */\nexport function isDedicatedInferenceModel(model, provider) {\n return ['embedding', 'moderation', 'image', 'transcription', 'speech', 'realtime', 'audio', 'video'].includes(resolveModelProfile(model, provider).family);\n}\n/** Embedding endpoints are not executable through the standard inference path. */\nexport function isEmbeddingModel(model, provider) {\n if (model.type?.toLowerCase() === 'embedding')\n return true;\n if (isModelDirectoryEmbedding(model.id))\n return true;\n const modalities = [...(model.input_modalities ?? []), ...(model.output_modalities ?? [])].map((modality) => modality.toLowerCase());\n if (modalities.some((modality) => modality === 'embed' || modality === 'embedding' || modality === 'vectors')) {\n return true;\n }\n return getModelCapabilities(model.id, provider).output.embed === true;\n}\n//# sourceMappingURL=capability.js.map","import { OptionType, SharedOptions } from '../types.js';\nexport const textOptionsFallback = {\n _option_id: 'text-fallback',\n options: [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n {\n name: SharedOptions.temperature,\n type: OptionType.numeric,\n min: 0.0,\n default: 0.7,\n integer: false,\n step: 0.1,\n description: 'A higher temperature biases toward less likely tokens, making the model more creative',\n },\n {\n name: SharedOptions.top_p,\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: false,\n step: 0.1,\n description: 'Limits token sampling to the cumulative probability of the top p tokens',\n },\n {\n name: SharedOptions.top_k,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 1,\n description: 'Limits token sampling to the top k tokens',\n },\n {\n name: SharedOptions.presence_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens if they appear at least once in the text',\n },\n {\n name: SharedOptions.frequency_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens based on their frequency in the text',\n },\n {\n name: SharedOptions.stop_sequence,\n type: OptionType.string_list,\n value: [],\n description: 'The generation will halt if one of the stop sequences is output',\n },\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: 'Include visible model reasoning as separate thoughts results.',\n },\n ],\n};\n//# sourceMappingURL=fallback.js.map","import { resolveModelProfile } from '../model-directory.js';\nimport { OptionType, Providers, SharedOptions, } from '../types.js';\nimport { getMaxOutputTokens } from './context-windows.js';\nimport { textOptionsFallback } from './fallback.js';\nimport { getOpenAiCompatibleOptions } from './openai.js';\nimport { buildClaudeCacheOptions, buildClaudeCacheTtlOptions, buildClaudeEffortOptions, buildClaudeIncludeThoughtsOption, buildClaudeThinkingBudgetOption, getClaudeMaxTokensLimit, } from './shared-parsing.js';\nimport { hasSamplingParameterRestriction, isGeminiModelVersionGte } from './version-parsing.js';\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport var ThinkingLevel;\n(function (ThinkingLevel) {\n ThinkingLevel[\"HIGH\"] = \"HIGH\";\n ThinkingLevel[\"MEDIUM\"] = \"MEDIUM\";\n ThinkingLevel[\"LOW\"] = \"LOW\";\n ThinkingLevel[\"MINIMAL\"] = \"MINIMAL\";\n ThinkingLevel[\"THINKING_LEVEL_UNSPECIFIED\"] = \"THINKING_LEVEL_UNSPECIFIED\";\n})(ThinkingLevel || (ThinkingLevel = {}));\n/** Models that support Flex processing (shared, cost-efficient tier). */\nconst FLEX_SUPPORTED_GEMINI_MODELS = [\n 'gemini-3.1-flash-lite-preview',\n 'gemini-3.1-flash-image-preview',\n 'gemini-3.1-pro-preview',\n 'gemini-3-flash-preview',\n 'gemini-3-pro-image-preview',\n 'gemini-3.5-flash',\n 'gemini-3.5-flash-lite',\n 'gemini-3.6-flash',\n];\nexport function isFlexSupportedGeminiModel(model) {\n const modelName = model.split('/').pop() ?? model;\n return (FLEX_SUPPORTED_GEMINI_MODELS.some((m) => modelName.includes(m)) ||\n (modelName.includes('flash') && !modelName.includes('image') && isGeminiModelVersionGte(modelName, '3.5')));\n}\nexport function getVertexAiOptions(model, option) {\n if (model.split('/').pop() === 'gemini-omni-flash-preview') {\n return {\n _option_id: 'vertexai-gemini-omni-video',\n options: [\n {\n name: 'task',\n type: OptionType.enum,\n enum: {\n 'Text to video': 'text_to_video',\n 'Image to video': 'image_to_video',\n 'Reference images to video': 'reference_to_video',\n },\n description: 'Video generation task. Image inputs require an explicit image task.',\n },\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { Landscape: '16:9', Portrait: '9:16' },\n description: 'Aspect ratio of the generated video.',\n },\n {\n name: 'duration_seconds',\n type: OptionType.numeric,\n min: 3,\n max: 10,\n default: 5,\n integer: true,\n description: 'Duration of the generated video in seconds.',\n },\n ],\n };\n }\n if (model.includes('imagen-')) {\n return getImagenOptions(model, option);\n }\n else if (model.includes('gemini')) {\n return getGeminiOptions(model, option);\n }\n else if (model.includes('claude')) {\n return getClaudeOptions(model, option);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getOpenMaaSChatOptions(model);\n }\n return textOptionsFallback;\n}\nfunction getImagenOptions(model, option) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images,\n type: OptionType.numeric,\n min: 1,\n max: 4,\n default: 1,\n integer: true,\n description: 'Number of Images to generate',\n },\n {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n min: 0,\n max: 4294967295,\n default: 12,\n integer: true,\n description: 'The seed of the generated image',\n },\n {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Disallow the inclusion of people or faces in images': 'dont_allow',\n 'Allow generation of adults only': 'allow_adult',\n 'Allow generation of people of all ages': 'allow_all',\n },\n default: 'allow_adult',\n description: 'The safety setting for allowing the generation of people in the image',\n },\n {\n name: 'safety_setting',\n type: OptionType.enum,\n enum: {\n 'Block very few problematic prompts and responses': 'block_none',\n 'Block only few problematic prompts and responses': 'block_only_high',\n 'Block some problematic prompts and responses': 'block_medium_and_above',\n 'Strictest filtering': 'block_low_and_above',\n },\n default: 'block_medium_and_above',\n description: 'The overall safety setting',\n },\n ];\n const outputOptions = [\n {\n name: 'image_file_type',\n type: OptionType.enum,\n enum: { JPEG: 'image/jpeg', PNG: 'image/png' },\n default: 'image/png',\n description: 'The file type of the generated image',\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: 'jpeg_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 75,\n integer: true,\n description: 'The compression quality of the JPEG image',\n };\n if (option?.image_file_type === 'image/jpeg') {\n outputOptions.push(jpegQuality);\n }\n if (model.includes('generate')) {\n // Generate models\n const modeOptions = [\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { '1:1': '1:1', '4:3': '4:3', '3:4': '3:4', '16:9': '16:9', '9:16': '9:16' },\n default: '1:1',\n description: 'The aspect ratio of the generated image',\n },\n {\n name: 'add_watermark',\n type: OptionType.boolean,\n default: false,\n description: 'Add an invisible watermark to the generated image, useful for detection of AI images',\n },\n ];\n const enhanceOptions = !model.includes('generate-001')\n ? [\n {\n name: 'enhance_prompt',\n type: OptionType.boolean,\n default: true,\n description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\",\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [...commonOptions, ...modeOptions, ...outputOptions, ...enhanceOptions],\n };\n }\n if (model.includes('capability')) {\n // Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: 'edit_mode',\n type: OptionType.enum,\n enum: {\n EDIT_MODE_INPAINT_REMOVAL: 'EDIT_MODE_INPAINT_REMOVAL',\n EDIT_MODE_INPAINT_INSERTION: 'EDIT_MODE_INPAINT_INSERTION',\n EDIT_MODE_BGSWAP: 'EDIT_MODE_BGSWAP',\n EDIT_MODE_OUTPAINT: 'EDIT_MODE_OUTPAINT',\n CUSTOMIZATION_SUBJECT: 'CUSTOMIZATION_SUBJECT',\n CUSTOMIZATION_STYLE: 'CUSTOMIZATION_STYLE',\n CUSTOMIZATION_CONTROLLED: 'CUSTOMIZATION_CONTROLLED',\n CUSTOMIZATION_INSTRUCT: 'CUSTOMIZATION_INSTRUCT',\n },\n description: 'The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.',\n },\n {\n name: 'guidance_scale',\n type: OptionType.numeric,\n min: 0,\n max: 500,\n default: guidanceScaleDefault,\n integer: true,\n description: 'How closely the generation follows the prompt',\n },\n ];\n const maskOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'mask_mode',\n type: OptionType.enum,\n enum: {\n MASK_MODE_USER_PROVIDED: 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND: 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND: 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC: 'MASK_MODE_SEMANTIC',\n },\n default: 'MASK_MODE_USER_PROVIDED',\n description: 'How should the mask for the generation be provided',\n },\n {\n name: 'mask_dilation',\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: true,\n description: 'The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.',\n },\n ]\n : [];\n const maskClassOptions = option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC\n ? [\n {\n name: 'mask_class',\n type: OptionType.string_list,\n default: [],\n description: 'Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids',\n },\n ]\n : [];\n const editOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'edit_steps',\n type: OptionType.numeric,\n default: 75,\n integer: true,\n description: 'The number of steps for the base image generation, more steps means more time and better quality',\n },\n ]\n : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED ||\n option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT\n ? [\n {\n name: 'controlType',\n type: OptionType.enum,\n enum: {\n 'Face Mesh': 'CONTROL_TYPE_FACE_MESH',\n Canny: 'CONTROL_TYPE_CANNY',\n Scribble: 'CONTROL_TYPE_SCRIBBLE',\n },\n default: 'CONTROL_TYPE_CANNY',\n description: 'Method used to generate the control image',\n },\n {\n name: 'controlImageComputation',\n type: OptionType.boolean,\n default: true,\n description: 'Should the control image be computed from the input image, or is it provided',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ],\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiEffortOptions(model) {\n if (model.includes('gemini-3-pro-image')) {\n return { High: 'high' };\n }\n if (model.includes('gemini-3.1-flash-image')) {\n return { Minimal: 'minimal', High: 'high' };\n }\n if (model.includes('pro') && isGeminiModelVersionGte(model, '3.1')) {\n return { Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\nfunction getGeminiThinkingOptionItems(model) {\n return [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: SharedOptions.effort,\n type: OptionType.enum,\n enum: getGeminiEffortOptions(model),\n description: 'Higher thinking levels may improve quality, but increase response times and token costs',\n },\n ];\n}\nfunction getGeminiOptions(model, option) {\n // Special handling for gemini image / nano banana models\n if (model.includes('image')) {\n const isGemini25OrLater = isGeminiModelVersionGte(model, '2.5');\n const isGemini3OrLater = isGeminiModelVersionGte(model, '3.0');\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\n 'max_tokens',\n 'presence_penalty',\n 'frequency_penalty',\n 'seed',\n 'top_k',\n 'include_thoughts',\n ];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Set max temperature to 2.0\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature && option.type === OptionType.numeric) {\n return {\n ...option,\n max: 2.0,\n };\n }\n return option;\n });\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'Maximum output tokens',\n },\n ];\n const imageOptions = [];\n // Aspect ratio, person generation, prominent people: 2.5+\n if (isGemini25OrLater) {\n imageOptions.push({\n name: 'image_aspect_ratio',\n type: OptionType.enum,\n enum: {\n '1:1': '1:1',\n '2:3': '2:3',\n '3:2': '3:2',\n '3:4': '3:4',\n '4:3': '4:3',\n '9:16': '9:16',\n '16:9': '16:9',\n '21:9': '21:9',\n },\n default: '1:1',\n description: 'Aspect ratio of the generated images',\n }, {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Allow all people': 'ALLOW_ALL',\n 'Allow adults only': 'ALLOW_ADULT',\n 'Do not generate people': 'ALLOW_NONE',\n },\n default: 'ALLOW_ALL',\n description: 'Controls the generation of people in images',\n }, {\n name: 'prominent_people',\n type: OptionType.enum,\n enum: {\n 'Allow prominent people': 'ALLOW_PROMINENT_PEOPLE',\n 'Block prominent people': 'BLOCK_PROMINENT_PEOPLE',\n },\n description: 'Controls whether prominent people (celebrities) can be generated',\n });\n }\n // Resolution settings: 3.0+\n if (isGemini3OrLater) {\n imageOptions.push({\n name: 'image_size',\n type: OptionType.enum,\n enum: {\n '1K': '1K',\n '2K': '2K',\n '4K': '4K',\n },\n default: '1K',\n description: 'Size of generated images',\n });\n }\n // Output format: all image models\n imageOptions.push({\n name: 'output_mime_type',\n type: OptionType.enum,\n enum: {\n PNG: 'image/png',\n JPEG: 'image/jpeg',\n },\n default: 'image/png',\n description: 'MIME type of the generated image',\n refresh: true,\n });\n if (option?.output_mime_type === 'image/jpeg') {\n imageOptions.push({\n name: 'output_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 90,\n integer: true,\n description: 'Compression quality for JPEG images (0-100)',\n });\n }\n // Thinking options: 3.0+ (same as non-image counterparts)\n const thinkingOptions = isGemini3OrLater ? getGeminiThinkingOptionItems(model) : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, ...imageOptions, ...thinkingOptions],\n };\n }\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'include_thoughts'];\n const commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n const seedOption = {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n integer: true,\n description: 'The seed for the generation, useful for reproducibility',\n };\n if (isGeminiModelVersionGte(model, '3.0')) {\n const serviceTierOptions = isFlexSupportedGeminiModel(model)\n ? [\n {\n name: 'service_tier',\n type: OptionType.enum,\n enum: { Default: 'default', Flex: 'flex' },\n default: 'default',\n description: 'Select the Vertex AI processing tier for this request.',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ...getGeminiThinkingOptionItems(model),\n ...serviceTierOptions,\n ],\n };\n }\n if (model.includes('-2.5-')) {\n // Gemini 2.5 thinking models\n // Set budget token ranges based on model variant\n let budgetMin = -1;\n let budgetMax = 24576;\n let budgetDescription = '';\n if (model.includes('flash-lite')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash Lite default: Model does not think. ' +\n 'Range: 512-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('flash')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 0-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('pro')) {\n budgetMin = -1;\n budgetMax = 32768;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Pro default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 128-32768 tokens. ' +\n 'Cannot disable thinking - minimum 128 tokens. Set to -1 for dynamic thinking.';\n }\n const geminiThinkingOptions = [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: 'thinking_budget_tokens',\n type: OptionType.numeric,\n min: budgetMin,\n max: budgetMax,\n default: undefined,\n integer: true,\n step: 100,\n description: budgetDescription,\n },\n ];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption, ...geminiThinkingOptions],\n };\n }\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption],\n };\n}\nfunction getClaudeOptions(model, option) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'presence_penalty', 'frequency_penalty', 'include_thoughts'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Opus 4.7+ models no longer support temperature, top_p, top_k (returns 400 error)\n // Opus 4.6 and Sonnet 4.6 still support these parameters\n const hasSamplingRestriction = hasSamplingParameterRestriction(model);\n if (hasSamplingRestriction) {\n commonOptions = commonOptions.filter((option) => option.name !== SharedOptions.temperature &&\n option.name !== SharedOptions.top_p &&\n option.name !== 'top_k');\n }\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n return {\n _option_id: 'vertexai-claude',\n options: [\n ...max_tokens,\n ...commonOptions,\n ...buildClaudeEffortOptions(model),\n ...buildClaudeThinkingBudgetOption(model),\n ...buildClaudeIncludeThoughtsOption(model),\n ...buildClaudeCacheOptions(),\n ...buildClaudeCacheTtlOptions(option?.cache_enabled),\n ],\n };\n}\nfunction isOpenMaaSChatModel(model) {\n const normalized = model.toLowerCase();\n // Open MaaS chat option support is family-based on purpose: new model releases inherit the\n // current OpenAI-compatible option surface unless a specific older model needs an exception.\n return ['deepseek', 'gemma-', 'glm-', 'gpt-oss', 'grok', 'kimi', 'llama', 'minimax', 'qwen', 'zai-org'].some((modelPart) => normalized.includes(modelPart));\n}\nfunction getOpenMaaSChatOptions(model) {\n const compatible = getOpenAiCompatibleOptions(model, undefined, resolveModelProfile(model, Providers.vertexai));\n const commonOptions = compatible.options\n // Vertex Open MaaS does not offer these OpenAI-native penalty fields consistently across source families.\n .filter((option) => option.name !== SharedOptions.presence_penalty && option.name !== SharedOptions.frequency_penalty)\n .map((commonOption) => {\n if (model.includes('llama') &&\n commonOption.name === SharedOptions.temperature &&\n commonOption.type === OptionType.numeric) {\n return {\n ...commonOption,\n max: 1.0,\n };\n }\n return commonOption;\n });\n return {\n ...compatible,\n options: commonOptions,\n };\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes('image')) {\n return isGeminiModelVersionGte(model, '2.5') ? 32768 : 8192;\n }\n if (model.includes('thinking') || isGeminiModelVersionGte(model, '2.5')) {\n return 65535; // API upper bound is exclusive\n }\n if (model.includes('ultra') || model.includes('vision')) {\n return 2048;\n }\n return 8192;\n}\nexport function getMaxTokensLimitVertexAi(model) {\n if (model.includes('imagen-')) {\n return 0; // Imagen models do not have a max tokens limit in the same way as text models\n }\n else if (model.includes('claude')) {\n return getClaudeMaxTokensLimit(model);\n }\n else if (model.includes('gemini')) {\n return getGeminiMaxTokensLimit(model);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getMaxOutputTokens(model);\n }\n return 8192; // Default fallback limit\n}\n//# sourceMappingURL=vertexai.js.map","import { ProviderList, Providers } from '@llumiverse/common';\n// Virtual providers from studio\nexport var CustomProviders;\n(function (CustomProviders) {\n CustomProviders[\"virtual_lb\"] = \"virtual_lb\";\n CustomProviders[\"virtual_mediator\"] = \"virtual_mediator\";\n CustomProviders[\"test\"] = \"test\";\n})(CustomProviders || (CustomProviders = {}));\n// The const and the type are one declaration in two halves: the object is what `z.enum()` reads the\n// members off, and the type is inferred back from that schema rather than restated as\n// `Providers | CustomProviders` — which is the same union, but a second statement of it.\nexport const SupportedProviders = {\n ...Providers,\n ...CustomProviders,\n};\nconst CustomProvidersList = {\n virtual_lb: {\n id: CustomProviders.virtual_lb,\n name: 'Virtual - Load Balancer',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n virtual_mediator: {\n id: CustomProviders.virtual_mediator,\n name: 'Virtual - Mediator',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n test: {\n id: CustomProviders.test,\n name: 'Test LLM',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\nexport const SupportedProvidersList = {\n ...ProviderList,\n ...CustomProvidersList,\n};\n//# sourceMappingURL=environment.js.map","export const MEMBERS_GROUP_NAME = 'members';\n//# sourceMappingURL=group.js.map","export var SupportedIntegrations;\n(function (SupportedIntegrations) {\n SupportedIntegrations[\"gladia\"] = \"gladia\";\n SupportedIntegrations[\"github\"] = \"github\";\n SupportedIntegrations[\"aws\"] = \"aws\";\n SupportedIntegrations[\"magic_pdf\"] = \"magic_pdf\";\n SupportedIntegrations[\"serper\"] = \"serper\";\n SupportedIntegrations[\"exa\"] = \"exa\";\n SupportedIntegrations[\"linkup\"] = \"linkup\";\n SupportedIntegrations[\"resend\"] = \"resend\";\n SupportedIntegrations[\"ask_user_webhook\"] = \"ask_user_webhook\";\n})(SupportedIntegrations || (SupportedIntegrations = {}));\n//# sourceMappingURL=integrations.js.map","// Interaction values that exist at runtime and are read by the API schemas.\n//\n// Split out of `interaction.ts` for the reason `project-values.ts` was split out of `project.ts`:\n// `InteractionExecutionConfigurationSchema` is `z.enum(...)` over these two, and importing\n// `interaction.ts` from a schema module at runtime would both be a cycle risk and pull the largest\n// module in the package into every schema consumer. Re-exported from `interaction.ts`, so this is a\n// move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: the first declaration in the file would\n// otherwise inherit this note as its published component `description`, the way `project-values.ts`\n// records.\nexport var RunDataStorageLevel;\n(function (RunDataStorageLevel) {\n RunDataStorageLevel[\"STANDARD\"] = \"STANDARD\";\n RunDataStorageLevel[\"RESTRICTED\"] = \"RESTRICTED\";\n RunDataStorageLevel[\"DEBUG\"] = \"DEBUG\";\n})(RunDataStorageLevel || (RunDataStorageLevel = {}));\nexport var ConfigModes;\n(function (ConfigModes) {\n ConfigModes[\"RUN_AND_INTERACTION_CONFIG\"] = \"RUN_AND_INTERACTION_CONFIG\";\n ConfigModes[\"RUN_CONFIG_ONLY\"] = \"RUN_CONFIG_ONLY\";\n ConfigModes[\"INTERACTION_CONFIG_ONLY\"] = \"INTERACTION_CONFIG_ONLY\";\n})(ConfigModes || (ConfigModes = {}));\n//# sourceMappingURL=interaction-values.js.map","/**\n * `RunDataStorageLevel` and `ConfigModes` live in `./interaction-values.js` so the API schemas can\n * read them without importing this module back. Re-exported here so every existing import path keeps\n * working.\n */\nexport * from './interaction-values.js';\nexport var InteractionStatus;\n(function (InteractionStatus) {\n InteractionStatus[\"draft\"] = \"draft\";\n InteractionStatus[\"published\"] = \"published\";\n InteractionStatus[\"archived\"] = \"archived\";\n InteractionStatus[\"code\"] = \"code\";\n InteractionStatus[\"unknown\"] = \"unknown\";\n})(InteractionStatus || (InteractionStatus = {}));\nexport var ExecutionRunStatus;\n(function (ExecutionRunStatus) {\n ExecutionRunStatus[\"created\"] = \"created\";\n ExecutionRunStatus[\"processing\"] = \"processing\";\n ExecutionRunStatus[\"completed\"] = \"completed\";\n ExecutionRunStatus[\"failed\"] = \"failed\";\n})(ExecutionRunStatus || (ExecutionRunStatus = {}));\n/**\n * Defines the scope for agent search operations.\n */\nexport var AgentSearchScope;\n(function (AgentSearchScope) {\n /**\n * Search is scoped to a specific collection.\n */\n AgentSearchScope[\"Collection\"] = \"collection\";\n})(AgentSearchScope || (AgentSearchScope = {}));\n// Re-exported from email.ts for backwards compatibility\nexport { isEmailChannel, isInteractiveChannel, } from './email.js';\nconst AGENT_RESOURCE_TYPES = [\n 'document',\n 'collection',\n 'content_type',\n 'interaction',\n 'prompt',\n 'agent',\n 'workflow',\n 'process',\n 'process_run',\n 'interaction_run',\n 'view',\n];\nconst AGENT_RESOURCE_ACTIONS = ['created', 'updated', 'deleted'];\n/**\n * Validate and normalize an untrusted value into a clean list of resource references. References\n * cross the wire and may originate from external/MCP tools, so malformed entries are dropped\n * rather than throwing, and an empty/absent label falls back to the id.\n */\nexport function normalizeAgentResources(value) {\n if (!Array.isArray(value))\n return [];\n const result = [];\n for (const entry of value) {\n if (!entry || typeof entry !== 'object')\n continue;\n const ref = entry;\n const { type, id, label, action, revision_id } = ref;\n if (typeof type !== 'string' || !AGENT_RESOURCE_TYPES.includes(type))\n continue;\n if (typeof id !== 'string' || id.length === 0)\n continue;\n if (typeof action !== 'string' || !AGENT_RESOURCE_ACTIONS.includes(action))\n continue;\n result.push({\n type: type,\n id,\n label: typeof label === 'string' && label.length > 0 ? label : id,\n action: action,\n ...(typeof revision_id === 'string' && revision_id.length > 0 ? { revision_id } : {}),\n });\n }\n return result;\n}\n// ================= end async execution payloads ====================\nexport var RunSourceTypes;\n(function (RunSourceTypes) {\n RunSourceTypes[\"api\"] = \"api\";\n RunSourceTypes[\"cli\"] = \"cli\";\n RunSourceTypes[\"ui\"] = \"ui\";\n RunSourceTypes[\"webhook\"] = \"webhook\";\n RunSourceTypes[\"test\"] = \"test-data\";\n RunSourceTypes[\"system\"] = \"system\";\n RunSourceTypes[\"schedule\"] = \"schedule\";\n})(RunSourceTypes || (RunSourceTypes = {}));\n/**\n * Source of the resolved model configuration\n */\nexport var ModelSource;\n(function (ModelSource) {\n /** Model was explicitly provided in the execution config */\n ModelSource[\"config\"] = \"config\";\n /** Model comes from the interaction definition */\n ModelSource[\"interaction\"] = \"interaction\";\n /** Model comes from environment's default_model */\n ModelSource[\"environmentDefault\"] = \"environmentDefault\";\n /** Model comes from project system interaction defaults */\n ModelSource[\"projectSystemDefault\"] = \"projectSystemDefault\";\n /** Model comes from project base defaults */\n ModelSource[\"projectBaseDefault\"] = \"projectBaseDefault\";\n /** Model comes from project modality-specific defaults */\n ModelSource[\"projectModalityDefault\"] = \"projectModalityDefault\";\n /** Model comes from legacy project defaults */\n ModelSource[\"projectLegacyDefault\"] = \"projectLegacyDefault\";\n})(ModelSource || (ModelSource = {}));\n//# sourceMappingURL=interaction.js.map","import { Permission } from './access-control-values.js';\nexport const OAUTH_SCOPE_OPENID = 'openid';\nexport const OAUTH_SCOPE_PROFILE = 'profile';\nexport const OAUTH_SCOPE_OFFLINE_ACCESS = 'offline_access';\nexport const OAUTH_SCOPE_PROJECT_SWITCH = 'project_switch';\nexport const OAUTH_STANDARD_SCOPES = [OAUTH_SCOPE_OPENID, OAUTH_SCOPE_PROFILE, OAUTH_SCOPE_OFFLINE_ACCESS];\n/**\n * Permissions that are never grantable as an OAuth scope: they administer persistent credentials,\n * hand out secret material, or are internal to the platform's own consoles.\n */\nconst NON_OAUTH_PERMISSION_SCOPES = new Set([\n Permission.api_key_create,\n Permission.api_key_update,\n Permission.api_key_delete,\n Permission.api_key_secret_read,\n Permission.manage_billing,\n Permission.billing_read,\n Permission.iam_impersonate,\n Permission.studio_access,\n]);\nconst OAUTH_PERMISSION_SCOPES = Object.values(Permission).filter((scope) => !NON_OAUTH_PERMISSION_SCOPES.has(scope));\n/** The permissions a client may request as OAuth scopes. */\nexport function getOAuthPermissionScopes() {\n return [...OAUTH_PERMISSION_SCOPES];\n}\n//# sourceMappingURL=oauth-scopes.js.map","export const DEFAULT_EVENT_AGENT_INTERACTION_REF = 'sys:GeneralAgent';\n//# sourceMappingURL=platform-event.js.map","// Project values that exist at runtime — currently the system role catalog.\n//\n// Split out of `project.ts` for the reason `account-values.ts` was split out of `user.ts`: the API\n// schemas need `SystemRoles` at runtime (`z.enum(SystemRoles)`), and `project.ts` needs the types\n// those schemas infer. Re-exported from `project.ts`, so this is a move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: `SystemRoles` is the first declaration in the\n// file, and zeno-server's scanner attaches a leading DOC comment to the declaration that follows it.\n// Written as JSDoc, this note became the published `SystemRoles.description` in the OpenAPI\n// document — internal migration commentary shipped to every generated client. The sibling\n// `access-control-values.ts` keeps its JSDoc header only because none of its enums are resolved\n// through that path.\n// Moved here from `project.ts` for the same reason: `ResourceVisibilitySchema` is `z.enum(...)` over\n// it, and a runtime import of `project.ts` from the schema modules would be a cycle. The enum stays\n// the single statement of the values — the schema reads them rather than restating them, which is\n// why `ResourceVisibility` is not a canonical alias.\nexport var ResourceVisibility;\n(function (ResourceVisibility) {\n ResourceVisibility[\"public\"] = \"public\";\n ResourceVisibility[\"account\"] = \"account\";\n ResourceVisibility[\"project\"] = \"project\";\n})(ResourceVisibility || (ResourceVisibility = {}));\nexport var SystemRoles;\n(function (SystemRoles) {\n SystemRoles[\"owner\"] = \"owner\";\n SystemRoles[\"admin\"] = \"admin\";\n SystemRoles[\"manager\"] = \"manager\";\n SystemRoles[\"developer\"] = \"developer\";\n SystemRoles[\"application\"] = \"application\";\n SystemRoles[\"automation\"] = \"automation\";\n SystemRoles[\"content_processor\"] = \"content_processor\";\n SystemRoles[\"consumer\"] = \"consumer\";\n SystemRoles[\"executor\"] = \"executor\";\n SystemRoles[\"reader\"] = \"reader\";\n SystemRoles[\"auditor\"] = \"auditor\";\n SystemRoles[\"support\"] = \"support\";\n SystemRoles[\"billing\"] = \"billing\";\n SystemRoles[\"member\"] = \"member\";\n SystemRoles[\"app_member\"] = \"app_member\";\n SystemRoles[\"content_superadmin\"] = \"content_superadmin\";\n})(SystemRoles || (SystemRoles = {}));\n//# sourceMappingURL=project-values.js.map","/**\n * `SystemRoles` lives in `./project-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './project-values.js';\n/**\n * System interaction category enum.\n * Categories group one or more system interactions for default model assignment.\n */\nexport var SystemInteractionCategory;\n(function (SystemInteractionCategory) {\n SystemInteractionCategory[\"content_type\"] = \"content_type\";\n SystemInteractionCategory[\"intake\"] = \"intake\";\n SystemInteractionCategory[\"analysis\"] = \"analysis\";\n SystemInteractionCategory[\"agent\"] = \"agent\";\n SystemInteractionCategory[\"non_applicable\"] = \"non_applicable\";\n})(SystemInteractionCategory || (SystemInteractionCategory = {}));\n/**\n * Map system interaction endpoints to categories.\n */\nexport const SYSTEM_INTERACTION_CATEGORIES = {\n ExtractInformation: SystemInteractionCategory.intake,\n SelectDocumentType: SystemInteractionCategory.intake,\n GenerateMetadataModel: SystemInteractionCategory.content_type,\n ChunkDocument: SystemInteractionCategory.intake,\n IdentifyTextSections: SystemInteractionCategory.intake,\n AnalyzeDocument: SystemInteractionCategory.analysis,\n ReduceTextSections: SystemInteractionCategory.analysis,\n GenericAgent: SystemInteractionCategory.non_applicable,\n AdhocTaskAgent: SystemInteractionCategory.non_applicable,\n Mediator: SystemInteractionCategory.non_applicable,\n AnalyzeConversation: SystemInteractionCategory.analysis,\n GetAgentConversationTopic: SystemInteractionCategory.analysis,\n ContentSearchAgent: SystemInteractionCategory.analysis,\n ContentSearchReranker: SystemInteractionCategory.analysis,\n StudioAssistant: SystemInteractionCategory.agent,\n};\n// export interface ProjectConfigurationEmbeddings {\n// environment: string;\n// max_tokens: number;\n// dimensions: number;\n// model?: string;\n// }\nexport var SupportedEmbeddingTypes;\n(function (SupportedEmbeddingTypes) {\n SupportedEmbeddingTypes[\"text\"] = \"text\";\n SupportedEmbeddingTypes[\"image\"] = \"image\";\n SupportedEmbeddingTypes[\"properties\"] = \"properties\";\n})(SupportedEmbeddingTypes || (SupportedEmbeddingTypes = {}));\nvar FullTextType;\n(function (FullTextType) {\n FullTextType[\"full_text\"] = \"full_text\";\n})(FullTextType || (FullTextType = {}));\nexport const SearchTypes = {\n ...SupportedEmbeddingTypes,\n ...FullTextType,\n};\nexport const ProjectRefPopulate = 'id name account';\n/**\n * Supported languages for full-text search with their display names.\n * Maps ISO 639-1 codes to human-readable language names.\n */\nexport const SUPPORTED_SEARCH_LANGUAGES = {\n en: 'English',\n zh: 'Chinese',\n es: 'Spanish',\n hi: 'Hindi',\n ar: 'Arabic',\n pt: 'Portuguese',\n bn: 'Bengali',\n ru: 'Russian',\n ja: 'Japanese',\n de: 'German',\n fr: 'French',\n ko: 'Korean',\n it: 'Italian',\n tr: 'Turkish',\n vi: 'Vietnamese',\n pl: 'Polish',\n uk: 'Ukrainian',\n nl: 'Dutch',\n th: 'Thai',\n el: 'Greek',\n cs: 'Czech',\n sv: 'Swedish',\n ro: 'Romanian',\n hu: 'Hungarian',\n da: 'Danish',\n fi: 'Finnish',\n no: 'Norwegian',\n he: 'Hebrew',\n id: 'Indonesian',\n fa: 'Persian',\n};\n//# sourceMappingURL=project.js.map","export var PromptStatus;\n(function (PromptStatus) {\n PromptStatus[\"draft\"] = \"draft\";\n PromptStatus[\"published\"] = \"published\";\n PromptStatus[\"archived\"] = \"archived\";\n})(PromptStatus || (PromptStatus = {}));\nexport var PromptSegmentDefType;\n(function (PromptSegmentDefType) {\n PromptSegmentDefType[\"chat\"] = \"chat\";\n PromptSegmentDefType[\"template\"] = \"template\";\n})(PromptSegmentDefType || (PromptSegmentDefType = {}));\nexport var TemplateType;\n(function (TemplateType) {\n TemplateType[\"jst\"] = \"jst\";\n TemplateType[\"handlebars\"] = \"handlebars\";\n TemplateType[\"text\"] = \"text\";\n})(TemplateType || (TemplateType = {}));\n//# sourceMappingURL=prompt.js.map","export var ResolvableRefType;\n(function (ResolvableRefType) {\n ResolvableRefType[\"project\"] = \"Project\";\n ResolvableRefType[\"projects\"] = \"Projects\";\n ResolvableRefType[\"environment\"] = \"Environment\";\n ResolvableRefType[\"user\"] = \"User\";\n ResolvableRefType[\"account\"] = \"Account\";\n ResolvableRefType[\"interaction\"] = \"Interaction\";\n ResolvableRefType[\"userGroup\"] = \"UserGroup\";\n})(ResolvableRefType || (ResolvableRefType = {}));\n//# sourceMappingURL=refs.js.map","/**\n * Extraction schema filtering.\n *\n * Content-type object_schema properties may set `\"x-extract\": false` to mark fields\n * that must not be filled by extraction models (match scores, ERP ids filled later,\n * internal bookkeeping). The full schema remains the object model for UI/storage;\n * only the filtered copy is used as result_schema for constrained decoding.\n */\nconst X_EXTRACT = 'x-extract';\nfunction unescapeJsonPointerSegment(segment) {\n return segment.replace(/~1/g, '/').replace(/~0/g, '~');\n}\nfunction resolveLocalRef(ref, root) {\n if (!ref.startsWith('#/')) {\n return undefined;\n }\n let current = root;\n for (const segment of ref.slice(2).split('/').map(unescapeJsonPointerSegment)) {\n if (!current || typeof current !== 'object' || Array.isArray(current)) {\n return undefined;\n }\n current = current[segment];\n }\n return current;\n}\nfunction isExtractableSchemaNodeInternal(schema, root, seenRefs) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return true;\n }\n const schemaObj = schema;\n if (schemaObj[X_EXTRACT] === false) {\n return false;\n }\n if (typeof schemaObj.$ref === 'string' && !seenRefs.has(schemaObj.$ref)) {\n seenRefs.add(schemaObj.$ref);\n const resolved = resolveLocalRef(schemaObj.$ref, root);\n if (resolved !== undefined) {\n return isExtractableSchemaNodeInternal(resolved, root, seenRefs);\n }\n }\n return true;\n}\nexport function isExtractableSchemaNode(schema, root = schema) {\n return isExtractableSchemaNodeInternal(schema, root, new Set());\n}\nfunction filterSchemaArray(value, root) {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const filtered = value\n .map((item) => schemaForExtractionNode(item, root))\n .filter((item) => item !== undefined);\n return filtered.length > 0 ? filtered : undefined;\n}\nfunction filterSchemaMap(value, root) {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return undefined;\n }\n const filtered = {};\n for (const [key, child] of Object.entries(value)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n filtered[key] = childFiltered;\n }\n }\n return Object.keys(filtered).length > 0 ? filtered : undefined;\n}\nfunction schemaForExtractionNode(schema, root) {\n if (!schema || typeof schema !== 'object') {\n return schema;\n }\n if (Array.isArray(schema)) {\n return schema.map((item) => schemaForExtractionNode(item, root));\n }\n if (!isExtractableSchemaNode(schema, root)) {\n return undefined;\n }\n const node = { ...schema };\n for (const defsKey of ['$defs', 'definitions']) {\n const defs = filterSchemaMap(node[defsKey], root);\n if (defs) {\n node[defsKey] = defs;\n }\n else {\n delete node[defsKey];\n }\n }\n if (node.items && typeof node.items === 'object') {\n const items = schemaForExtractionNode(node.items, root);\n if (items !== undefined) {\n node.items = items;\n }\n else {\n delete node.items;\n }\n }\n for (const unionKey of ['anyOf', 'oneOf', 'allOf']) {\n if (Array.isArray(node[unionKey])) {\n const filtered = filterSchemaArray(node[unionKey], root);\n if (!filtered) {\n return undefined;\n }\n node[unionKey] = filtered;\n }\n }\n if (node.additionalProperties && typeof node.additionalProperties === 'object') {\n const additionalProperties = schemaForExtractionNode(node.additionalProperties, root);\n node.additionalProperties = additionalProperties ?? false;\n }\n if (node.properties && typeof node.properties === 'object' && !Array.isArray(node.properties)) {\n const props = {};\n for (const [key, child] of Object.entries(node.properties)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n props[key] = childFiltered;\n }\n }\n node.properties = props;\n if (Array.isArray(node.required)) {\n const kept = node.required.filter((r) => typeof r === 'string' && r in props);\n if (kept.length > 0) {\n node.required = kept;\n }\n else {\n delete node.required;\n }\n }\n }\n // Drop the flag from the extraction copy (not needed by providers)\n delete node[X_EXTRACT];\n return node;\n}\n/**\n * Deep-clones a JSON schema and removes properties (recursively) marked\n * `x-extract: false`, cleaning `required` arrays to match.\n */\nexport function schemaForExtraction(schema) {\n return (schemaForExtractionNode(schema, schema) ?? {});\n}\nfunction resolveSchemaNode(schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return schema;\n }\n const schemaObj = schema;\n if (typeof schemaObj.$ref !== 'string') {\n return schema;\n }\n return resolveLocalRef(schemaObj.$ref, root) ?? schema;\n}\nfunction mergePreservingNonExtractableNode(existing, extracted, schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return extracted;\n }\n const resolved = resolveSchemaNode(schema, root);\n if (!resolved || typeof resolved !== 'object' || Array.isArray(resolved)) {\n return extracted;\n }\n const schemaObj = resolved;\n // Arrays are new extraction output. Without a declared stable item key, index\n // merging can attach preserved ERP/match fields to the wrong row.\n if (Array.isArray(extracted)) {\n const itemSchema = schemaObj.items;\n if (!itemSchema || typeof itemSchema !== 'object') {\n return extracted;\n }\n return extracted.map((item) => mergePreservingNonExtractableNode(undefined, item, itemSchema, root));\n }\n if (!extracted || typeof extracted !== 'object' || Array.isArray(extracted)) {\n return extracted;\n }\n const props = schemaObj.properties;\n if (!props || typeof props !== 'object' || Array.isArray(props)) {\n return extracted;\n }\n const existingObj = existing && typeof existing === 'object' && !Array.isArray(existing)\n ? existing\n : {};\n const extractedObj = extracted;\n const propSchemas = props;\n const result = { ...extractedObj };\n for (const [key, propSchema] of Object.entries(propSchemas)) {\n if (!isExtractableSchemaNode(propSchema, root)) {\n // Model should not have filled this; restore prior value if any.\n if (key in existingObj) {\n result[key] = existingObj[key];\n }\n else {\n delete result[key];\n }\n continue;\n }\n if (key in extractedObj) {\n result[key] = mergePreservingNonExtractableNode(existingObj[key], extractedObj[key], propSchema, root);\n }\n }\n return result;\n}\n/**\n * Merge model output over existing properties while preserving values at paths\n * marked `x-extract: false` on the full (unfiltered) schema.\n */\nexport function mergePreservingNonExtractable(existing, extracted, schema) {\n return mergePreservingNonExtractableNode(existing, extracted, schema, schema);\n}\n//# sourceMappingURL=schema-for-extraction.js.map","export const AgentToolApprovalModes = ['ask', 'auto_review', 'full_control'];\nexport function normalizeAgentToolApprovalMode(mode, interactive) {\n if (interactive !== true) {\n return 'full_control';\n }\n return mode ?? 'full_control';\n}\n//# sourceMappingURL=agent-approval.js.map","export var CollectionStatus;\n(function (CollectionStatus) {\n CollectionStatus[\"active\"] = \"active\";\n CollectionStatus[\"archived\"] = \"archived\";\n})(CollectionStatus || (CollectionStatus = {}));\n//# sourceMappingURL=collections.js.map","/** Artifact key of the stored conversation catalog, relative to the agent storage root. */\nexport const CONVERSATION_CATALOG_ARTIFACT_KEY = 'catalog.json';\n//# sourceMappingURL=conversation-state.js.map","export function withDSLWorkflowSpecDiscriminator(spec) {\n if ('steps' in spec && spec.steps) {\n return { ...spec, spec_format: 'steps' };\n }\n return { ...spec, spec_format: 'activities' };\n}\nexport const WorkflowDefinitionRefPopulate = 'id name description tags created_at updated_at';\n//# sourceMappingURL=dsl-workflow.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeEditingPolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeEditingPolicySchema = {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n description: 'Agent interaction used for new document-editing sessions. Defaults to sys:GeneralAgent.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for collaborative document editing.',\n};\n//# sourceMappingURL=editing-policy-schema.generated.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeIntakePolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeIntakePolicySchema = {\n type: 'object',\n properties: {\n mode: {\n type: 'string',\n enum: ['programmatic', 'agentic'],\n description: 'Intake orchestration mode for this type.',\n },\n identification: {\n type: 'object',\n properties: {\n guidance: {\n type: 'string',\n },\n distinguish_from: {\n type: 'string',\n },\n examples: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n additionalProperties: false,\n description: 'Guidance used when selecting or creating this content type.',\n },\n locate: {\n type: 'object',\n properties: {\n instructions: {\n type: 'string',\n description: 'What to look for (\"commercial terms, payment schedule, signature pages\").',\n },\n detail: {\n type: 'number',\n enum: [8, 16],\n description: 'Pages per contact sheet: 8 = bigger tiles (headings readable). Default 16.',\n },\n min_pages: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n description: 'Only run when the page count is at least this. Default 8.',\n },\n },\n required: ['instructions'],\n additionalProperties: false,\n description: 'Document-map (\"locate\") pass: page thumbnails tiled into labeled contact sheets, one vision call returns which pages matter for THIS type. The result can scope conversion and extraction, and doubles as the vision planner for visual extraction.',\n },\n text_conversion: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n method: {\n type: 'string',\n enum: ['auto', 'basic', 'llm', 'custom'],\n },\n custom: {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n },\n agent: {\n type: 'string',\n },\n },\n additionalProperties: false,\n },\n instructions: {\n type: 'string',\n },\n output_format: {\n type: 'string',\n enum: ['markdown', 'text'],\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages to convert: everything or the locate result. Default all.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges to convert (wins over `scope` when set).',\n },\n render_dpi: {\n type: 'integer',\n minimum: 72,\n maximum: 2147483647,\n description: 'DPI at which each page is rendered to the image the LLM converts. Default 150 — the accuracy/cost sweet spot: higher resolutions balloon input tokens (some providers tile the page) for no quality gain, below ~150 dense tables start to misread. Raise only for very fine print.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the page-conversion interaction (method 'llm'/'auto' -> sys:ConvertPageToMarkdown, method 'custom' -> the custom interaction). Lets the visual conversion run on a cheaper/faster model (e.g. a flash model) than extraction. When unset, conversion uses the run's model config or the project default model.\",\n },\n },\n additionalProperties: false,\n description: 'Controls source-to-text conversion before extraction and embedding.',\n },\n extraction: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n source: {\n type: 'string',\n enum: ['auto', 'text', 'vision', 'mixed'],\n },\n instructions: {\n type: 'string',\n },\n interaction: {\n type: 'string',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the standard property-extraction interaction (sys:ExtractInformation). Lets extraction run on a different model/environment than the visual page conversion. When unset, extraction uses the run's model config or the project default model. (Grounded extraction is configured separately via grounding.config.)\",\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages extraction sees: everything or the locate result.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges extraction sees (wins over `scope` when set).',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on pages sent to extraction. Default 20.',\n },\n vision: {\n type: 'object',\n properties: {\n default_detail: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n allowed_details: {\n type: 'array',\n items: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n },\n max_image_tokens: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'PRIMARY budget: estimated image tokens per extraction call. Default 16000.',\n },\n max_payload_mb: {\n type: 'number',\n minimum: 1,\n description: 'Transport guard in megabytes. Default 16.',\n },\n max_pages_per_call: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on page images per extraction call. Default 8.',\n },\n },\n additionalProperties: false,\n description: 'Vision evidence budget for visual extraction. Detail names reference platform profiles; the type never defines dpi/quality/resolution.',\n },\n verification: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n model: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n materiality: {\n type: 'string',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n max_retries: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n },\n on_fail: {\n type: 'string',\n enum: ['flag', 'block'],\n },\n },\n additionalProperties: false,\n },\n grounding: {\n $ref: '#/$defs/ContentTypeExtractionGroundingPolicy',\n description: 'Controls PDF block-level citation grounding with annotated proof output.',\n },\n },\n additionalProperties: false,\n description: 'Controls schema-property extraction after type assignment.',\n },\n rendering_template: {\n type: 'string',\n description: 'Handlebars template used to materialize extracted properties into object text.',\n },\n embeddings: {\n $ref: '#/$defs/EmbeddingTypeEnabledMap',\n description: 'Per-type embedding switches. Unspecified values inherit the project policy.',\n },\n generate_toc: {\n type: 'boolean',\n description: 'Whether intake should generate a table of contents for matching documents.',\n },\n default_view: {\n type: 'string',\n enum: ['auto', 'text', 'pdf', 'image', 'properties'],\n description: 'Preferred first view for objects of this type.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for the standard intake workflows.',\n $defs: {\n AzureFoundryChatOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'azure-foundry-chat',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n seed: {\n type: 'number',\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockAI21Options: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-ai21',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n top_k: {\n type: 'number',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockCohereCommandOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-cohere-command',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockConverseOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-converse',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockGptOssOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-gpt-oss',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleChatCompletionsOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-chat-completions',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n reasoning_effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleResponsesOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-responses',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n reasoning_effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n verbosity: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMistralOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mistral',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockNovaOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockPalmyraOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-palmyra',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n min_tokens: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ConfigModes: {\n type: 'string',\n enum: ['RUN_AND_INTERACTION_CONFIG', 'RUN_CONFIG_ONLY', 'INTERACTION_CONFIG_ONLY'],\n },\n ContentTypeExtractionGroundingPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable PDF block-level citation grounding for property extraction.',\n },\n interaction: {\n type: 'string',\n description: 'Grounded extraction interaction. Defaults to the system grounded extractor.',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages to process.',\n },\n force_ocr: {\n type: 'boolean',\n description: 'Run OCR on every page even when a text layer exists.',\n },\n use_vision: {\n type: 'boolean',\n description: 'Attach instrumented page images to the grounded extraction prompt.',\n },\n raster_mode: {\n type: 'string',\n enum: ['vision', 'ocr'],\n description: \"How to read pages with no digital text layer (scans / image-only pages). 'vision' (default): read them off the page image and skip OCR. 'ocr': legacy path — OCR those pages and block-ground on the (lossy) OCR text.\",\n },\n grid_cell_pt: {\n type: 'number',\n minimum: 1,\n description: 'A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid (more cells, tighter boxes) but can trip weaker models into over-reading; tune per the model in `config`. Default 15.',\n },\n omit_block_boxes: {\n type: 'boolean',\n description: 'Drop block bounding boxes from the extraction prompt. Only sound with use_vision (layout comes from the image).',\n },\n window_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages per grounded extraction call before windowing.',\n },\n update_properties: {\n type: 'boolean',\n description: 'Update object properties with grounded extraction data. Default true.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the main grounded extraction interaction.',\n },\n hard_config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration used for hard-to-read content.',\n },\n hardness_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which hard_config is used. Default 0.5.',\n },\n min_citation_density: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Minimum citations-per-leaf-value ratio; completions below it retry with escalation. Default 0.3.',\n },\n refresh_ocr: {\n type: 'boolean',\n description: 'Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output).',\n },\n review: {\n $ref: '#/$defs/ContentTypeExtractionGroundingReviewPolicy',\n description: 'Optional post-extraction review pass.',\n },\n },\n additionalProperties: false,\n },\n ContentTypeExtractionGroundingReviewPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Set false to disable an inherited grounding review pass for this type.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the review interaction.',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which review runs. Defaults to hardness_threshold.',\n },\n coverage_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: \"Review also runs when any page's citation coverage falls below this floor (evidence of missed content). Default 0.2.\",\n },\n force: {\n type: 'boolean',\n description: 'Run review regardless of hardness.',\n },\n },\n additionalProperties: false,\n },\n EmbeddingTypeEnabledMap: {\n type: 'object',\n properties: {\n text: {\n type: 'boolean',\n },\n image: {\n type: 'boolean',\n },\n properties: {\n type: 'boolean',\n },\n },\n additionalProperties: false,\n },\n GroqOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'groq-deepseek-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_format: {\n type: 'string',\n enum: ['parsed', 'raw', 'hidden'],\n },\n },\n required: ['_option_id', 'reasoning_format'],\n additionalProperties: false,\n },\n HttpTimeoutOptions: {\n type: 'object',\n properties: {\n headersTimeout: {\n type: 'number',\n description: 'Time (ms) to wait for the first response byte after the request is sent.',\n },\n bodyTimeout: {\n type: 'number',\n description: 'Time (ms) between body chunks once streaming has started.',\n },\n connectTimeout: {\n type: 'number',\n description: 'TCP/TLS connect timeout (ms).',\n },\n keepAliveTimeout: {\n type: 'number',\n description: 'Idle socket reuse timeout (ms).',\n },\n },\n additionalProperties: false,\n description: \"HTTP timeouts applied to a driver's upstream LLM-provider calls.\\n\\nAll values are in milliseconds. Drivers should map these onto whatever HTTP client their SDK uses; the defaults applied in `@llumiverse/core/createDriverHttpAgent` are: - headersTimeout: 900_000 - bodyTimeout: 900_000 - connectTimeout: 60_000 - keepAliveTimeout: 300_000\\n\\nThe response defaults are deliberately longer than the hosting request boundary. Application-level cancellation should end user work first; driver timeouts are bounded-resource safety nets.\",\n },\n ImagenMaskMode: {\n type: 'string',\n enum: ['MASK_MODE_USER_PROVIDED', 'MASK_MODE_BACKGROUND', 'MASK_MODE_FOREGROUND', 'MASK_MODE_SEMANTIC'],\n },\n ImagenOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-imagen',\n },\n number_of_images: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n person_generation: {\n type: 'string',\n enum: ['dont_allow', 'allow_adults', 'allow_all'],\n },\n safety_setting: {\n type: 'string',\n enum: ['block_none', 'block_only_high', 'block_medium_and_above', 'block_low_and_above'],\n },\n image_file_type: {\n type: 'string',\n enum: ['image/jpeg', 'image/png'],\n },\n jpeg_compression_quality: {\n type: 'number',\n },\n aspect_ratio: {\n type: 'string',\n enum: ['1:1', '4:3', '3:4', '16:9', '9:16'],\n },\n add_watermark: {\n type: 'boolean',\n },\n enhance_prompt: {\n type: 'boolean',\n },\n edit_mode: {\n $ref: '#/$defs/ImagenTaskType',\n },\n guidance_scale: {\n type: 'number',\n },\n edit_steps: {\n type: 'number',\n },\n mask_mode: {\n $ref: '#/$defs/ImagenMaskMode',\n },\n mask_dilation: {\n type: 'number',\n },\n mask_class: {\n type: 'array',\n items: {\n type: 'number',\n },\n },\n controlType: {\n type: 'string',\n enum: ['CONTROL_TYPE_FACE_MESH', 'CONTROL_TYPE_CANNY', 'CONTROL_TYPE_SCRIBBLE'],\n },\n controlImageComputation: {\n type: 'boolean',\n },\n subjectType: {\n type: 'string',\n enum: [\n 'SUBJECT_TYPE_PERSON',\n 'SUBJECT_TYPE_ANIMAL',\n 'SUBJECT_TYPE_PRODUCT',\n 'SUBJECT_TYPE_DEFAULT',\n ],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ImagenTaskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'EDIT_MODE_INPAINT_REMOVAL',\n 'EDIT_MODE_INPAINT_INSERTION',\n 'EDIT_MODE_BGSWAP',\n 'EDIT_MODE_OUTPAINT',\n 'CUSTOMIZATION_SUBJECT',\n 'CUSTOMIZATION_STYLE',\n 'CUSTOMIZATION_CONTROLLED',\n 'CUSTOMIZATION_INSTRUCT',\n ],\n },\n IntakePageRanges: {\n type: 'array',\n items: {\n minItems: 2,\n maxItems: 2,\n type: 'array',\n items: {\n type: 'integer',\n minimum: -2147483648,\n maximum: 2147483647,\n },\n },\n description: 'Static page ranges: inclusive [start, end] pairs; negative indexes count from the end of the document ([[1, 2], [-1, -1]] = first two pages plus the last page).',\n },\n IntakePageScope: {\n type: 'string',\n enum: ['all', 'located'],\n description: 'Named page scope for intake conversion/extraction: everything or the locate-pass result. Static page ranges live in the sibling `page_ranges` field (which wins when set) — kept as a SEPARATE field because scalar-or-collection unions generate unstable API clients.',\n },\n IntakeVisionDetail: {\n type: 'string',\n enum: ['low', 'standard', 'high'],\n description: 'Vision detail level names referenced by intake policies. The rendering profiles behind the names (dpi, max size, quality, color mode) are PLATFORM-defined and project-overridable — a type only ever references a detail name.',\n },\n InteractionExecutionConfiguration: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n model: {\n type: 'string',\n },\n do_validate: {\n type: 'boolean',\n },\n run_data: {\n $ref: '#/$defs/RunDataStorageLevel',\n },\n configMode: {\n $ref: '#/$defs/ConfigModes',\n },\n model_options: {\n $ref: '#/$defs/ModelOptions',\n },\n prompt_cache_key: {\n type: 'string',\n description: 'Stable provider-side routing key for automatic prompt caching.',\n },\n prompt_cache_mode: {\n $ref: '#/$defs/PromptCacheMode',\n description: 'Controls provider-side explicit caching: auto falls back safely, off disables it, and required surfaces cache preparation failures for diagnostics.',\n },\n prompt_cache_ttl_seconds: {\n type: 'integer',\n minimum: 60,\n maximum: 9007199254740991,\n description: 'Caller-selected explicit cache lifetime in seconds. Defaults remain provider-specific; Vertex Gemini requires at least 60 seconds.',\n },\n prompt_cache_schema_suffix: {\n type: 'boolean',\n description: 'Put the result schema after the cached prefix; Vertesia still validates the returned JSON against it.',\n },\n http_timeout: {\n $ref: '#/$defs/HttpTimeoutOptions',\n description: 'Per-run HTTP timeouts for upstream LLM-provider calls.',\n },\n },\n additionalProperties: false,\n },\n MistralTextOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'mistral-text',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['none', 'high'],\n },\n random_seed: {\n type: 'integer',\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n },\n safe_prompt: {\n type: 'boolean',\n },\n parallel_tool_calls: {\n type: 'boolean',\n },\n tool_choice: {\n type: 'string',\n enum: ['auto', 'none', 'any', 'required'],\n },\n prompt_mode: {\n type: 'string',\n const: 'reasoning',\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ModelOptions: {\n oneOf: [\n {\n $ref: '#/$defs/TextFallbackOptions',\n },\n {\n $ref: '#/$defs/AzureFoundryChatOptions',\n },\n {\n $ref: '#/$defs/ImagenOptions',\n },\n {\n $ref: '#/$defs/VertexAIClaudeOptions',\n },\n {\n $ref: '#/$defs/VertexAIGeminiOptions',\n },\n {\n $ref: '#/$defs/VertexAIGeminiOmniVideoOptions',\n },\n {\n $ref: '#/$defs/VertexAIGrokOptions',\n },\n {\n $ref: '#/$defs/NovaCanvasOptions',\n },\n {\n $ref: '#/$defs/BedrockConverseOptions',\n },\n {\n $ref: '#/$defs/BedrockNovaOptions',\n },\n {\n $ref: '#/$defs/BedrockMistralOptions',\n },\n {\n $ref: '#/$defs/BedrockAI21Options',\n },\n {\n $ref: '#/$defs/BedrockCohereCommandOptions',\n },\n {\n $ref: '#/$defs/BedrockClaudeOptions',\n },\n {\n $ref: '#/$defs/BedrockPalmyraOptions',\n },\n {\n $ref: '#/$defs/BedrockGptOssOptions',\n },\n {\n $ref: '#/$defs/TwelvelabsPegasusOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleResponsesOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleChatCompletionsOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleClaudeOptions',\n },\n {\n $ref: '#/$defs/OpenAiThinkingOptions',\n },\n {\n $ref: '#/$defs/OpenAiTextOptions',\n },\n {\n $ref: '#/$defs/OpenAiDalleOptions',\n },\n {\n $ref: '#/$defs/OpenAiGptImageOptions',\n },\n {\n $ref: '#/$defs/XAIGrokImageOptions',\n },\n {\n $ref: '#/$defs/GroqOptions',\n },\n {\n $ref: '#/$defs/MistralTextOptions',\n },\n ],\n },\n NovaCanvasOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova-canvas',\n },\n taskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'TEXT_IMAGE_WITH_IMAGE_CONDITIONING',\n 'COLOR_GUIDED_GENERATION',\n 'IMAGE_VARIATION',\n 'INPAINTING',\n 'OUTPAINTING',\n 'BACKGROUND_REMOVAL',\n ],\n },\n width: {\n type: 'number',\n },\n height: {\n type: 'number',\n },\n quality: {\n type: 'string',\n enum: ['standard', 'premium'],\n },\n cfgScale: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n numberOfImages: {\n type: 'number',\n },\n controlMode: {\n type: 'string',\n enum: ['CANNY_EDGE', 'SEGMENTATION'],\n },\n controlStrength: {\n type: 'number',\n },\n colors: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n similarityStrength: {\n type: 'number',\n },\n outPaintingMode: {\n type: 'string',\n enum: ['DEFAULT', 'PRECISE'],\n },\n },\n required: ['_option_id', 'taskType'],\n additionalProperties: false,\n },\n OpenAiDalleOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-dalle',\n },\n size: {\n type: 'string',\n enum: ['256x256', '512x512', '1024x1024', '1792x1024', '1024x1792'],\n },\n image_quality: {\n type: 'string',\n enum: ['standard', 'hd'],\n },\n style: {\n type: 'string',\n enum: ['vivid', 'natural'],\n },\n response_format: {\n type: 'string',\n enum: ['url', 'b64_json'],\n },\n n: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiGptImageOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-gpt-image',\n },\n size: {\n type: 'string',\n enum: ['1024x1024', '1024x1536', '1536x1024', 'auto'],\n },\n image_quality: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'auto'],\n },\n background: {\n type: 'string',\n enum: ['transparent', 'opaque', 'auto'],\n },\n output_format: {\n type: 'string',\n enum: ['png', 'webp', 'jpeg'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiTextOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-text',\n },\n max_tokens: {\n type: 'number',\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n extra_body: {\n type: 'object',\n additionalProperties: true,\n description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiThinkingOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n extra_body: {\n type: 'object',\n additionalProperties: true,\n description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n PromptCacheMode: {\n type: 'string',\n enum: ['auto', 'off', 'required'],\n },\n ReasoningEffort: {\n type: 'string',\n enum: ['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'],\n },\n RunDataStorageLevel: {\n type: 'string',\n enum: ['STANDARD', 'RESTRICTED', 'DEBUG'],\n },\n TextFallbackOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'text-fallback',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ThinkingLevel: {\n type: 'string',\n enum: ['HIGH', 'MEDIUM', 'LOW', 'MINIMAL', 'THINKING_LEVEL_UNSPECIFIED'],\n },\n TwelvelabsPegasusOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-twelvelabs-pegasus',\n },\n temperature: {\n type: 'number',\n },\n max_tokens: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGeminiOmniVideoOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-gemini-omni-video',\n },\n task: {\n type: 'string',\n enum: ['text_to_video', 'image_to_video', 'reference_to_video'],\n },\n aspect_ratio: {\n type: 'string',\n enum: ['16:9', '9:16'],\n },\n duration_seconds: {\n type: 'integer',\n minimum: 3,\n maximum: 10,\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGeminiOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-gemini',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['minimal', 'low', 'medium', 'high'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n thinking_level: {\n $ref: '#/$defs/ThinkingLevel',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n flex: {\n type: 'boolean',\n deprecated: true,\n 'x-deprecated-message': 'Use service_tier=\"flex\" instead.',\n description: 'Deprecated: Use service_tier=\"flex\" instead.',\n },\n image_aspect_ratio: {\n type: 'string',\n enum: ['1:1', '2:3', '3:2', '3:4', '4:3', '9:16', '16:9', '21:9'],\n },\n image_size: {\n type: 'string',\n enum: ['1K', '2K', '4K'],\n },\n person_generation: {\n type: 'string',\n enum: ['ALLOW_ALL', 'ALLOW_ADULT', 'ALLOW_NONE'],\n },\n prominent_people: {\n type: 'string',\n enum: ['PROMINENT_PEOPLE_UNSPECIFIED', 'ALLOW_PROMINENT_PEOPLE', 'BLOCK_PROMINENT_PEOPLE'],\n },\n output_mime_type: {\n type: 'string',\n enum: ['image/png', 'image/jpeg'],\n },\n output_compression_quality: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGrokOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-grok',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n XAIGrokImageOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'xai-grok-image',\n },\n aspect_ratio: {\n type: 'string',\n enum: [\n '1:1',\n '16:9',\n '9:16',\n '4:3',\n '3:4',\n '3:2',\n '2:3',\n '2:1',\n '1:2',\n '19.5:9',\n '9:19.5',\n '20:9',\n '9:20',\n 'auto',\n ],\n },\n resolution: {\n type: 'string',\n enum: ['1k', '2k'],\n },\n quality: {\n type: 'string',\n enum: ['low', 'medium'],\n },\n response_format: {\n type: 'string',\n enum: ['url', 'b64_json'],\n },\n n: {\n type: 'integer',\n minimum: 1,\n maximum: 10,\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n },\n};\n//# sourceMappingURL=intake-policy-schema.generated.js.map","export const PROCESS_DEFINITION_FORMAT_VERSION = 1;\n//# sourceMappingURL=process.js.map","import { normalizeAgentResources } from '../interaction.js';\nexport var ContentEventName;\n(function (ContentEventName) {\n ContentEventName[\"create\"] = \"create\";\n ContentEventName[\"change_type\"] = \"change_type\";\n ContentEventName[\"update\"] = \"update\";\n ContentEventName[\"revision_created\"] = \"revision_created\";\n ContentEventName[\"delete\"] = \"delete\";\n ContentEventName[\"workflow_finished\"] = \"workflow_finished\";\n ContentEventName[\"workflow_execution_request\"] = \"workflow_execution_request\";\n ContentEventName[\"api_request\"] = \"api_request\";\n})(ContentEventName || (ContentEventName = {}));\nexport function getDocumentIds(payload) {\n // Check new input format first\n if (payload.input?.inputType === 'objectIds') {\n return payload.input.objectIds;\n }\n // Fall back to legacy objectIds field\n if (payload.objectIds) {\n return payload.objectIds;\n }\n return [];\n}\n// Task status enum for processed history\nexport var TaskStatus;\n(function (TaskStatus) {\n TaskStatus[\"SCHEDULED\"] = \"scheduled\";\n TaskStatus[\"RUNNING\"] = \"running\";\n TaskStatus[\"COMPLETED\"] = \"completed\";\n TaskStatus[\"FAILED\"] = \"failed\";\n TaskStatus[\"CANCELED\"] = \"canceled\";\n TaskStatus[\"TIMED_OUT\"] = \"timed_out\";\n TaskStatus[\"TERMINATED\"] = \"terminated\";\n TaskStatus[\"SENT\"] = \"sent\";\n TaskStatus[\"RECEIVED\"] = \"received\";\n})(TaskStatus || (TaskStatus = {}));\n// Task type enum\nexport var TaskType;\n(function (TaskType) {\n TaskType[\"ACTIVITY\"] = \"activity\";\n TaskType[\"CHILD_WORKFLOW\"] = \"childWorkflow\";\n TaskType[\"SIGNAL\"] = \"signal\";\n TaskType[\"TIMER\"] = \"timer\";\n})(TaskType || (TaskType = {}));\nexport const WorkflowExecutionStatusValues = {\n UNKNOWN: 0,\n RUNNING: 1,\n COMPLETED: 2,\n FAILED: 3,\n CANCELED: 4,\n TERMINATED: 5,\n CONTINUED_AS_NEW: 6,\n TIMED_OUT: 7,\n};\n// Keep numeric reverse lookup for existing callers without treating newer Temporal-only status\n// codes as part of Vertesia's published enum. Unknown numeric codes therefore read as undefined.\nexport const WorkflowExecutionStatus = {\n ...WorkflowExecutionStatusValues,\n 0: 'UNKNOWN',\n 1: 'RUNNING',\n 2: 'COMPLETED',\n 3: 'FAILED',\n 4: 'CANCELED',\n 5: 'TERMINATED',\n 6: 'CONTINUED_AS_NEW',\n 7: 'TIMED_OUT',\n};\nexport var AgentMessageType;\n(function (AgentMessageType) {\n AgentMessageType[AgentMessageType[\"SYSTEM\"] = 0] = \"SYSTEM\";\n AgentMessageType[AgentMessageType[\"THOUGHT\"] = 1] = \"THOUGHT\";\n AgentMessageType[AgentMessageType[\"PLAN\"] = 2] = \"PLAN\";\n AgentMessageType[AgentMessageType[\"UPDATE\"] = 3] = \"UPDATE\";\n AgentMessageType[AgentMessageType[\"COMPLETE\"] = 4] = \"COMPLETE\";\n AgentMessageType[AgentMessageType[\"WARNING\"] = 5] = \"WARNING\";\n AgentMessageType[AgentMessageType[\"ERROR\"] = 6] = \"ERROR\";\n AgentMessageType[AgentMessageType[\"ANSWER\"] = 7] = \"ANSWER\";\n AgentMessageType[AgentMessageType[\"QUESTION\"] = 8] = \"QUESTION\";\n AgentMessageType[AgentMessageType[\"REQUEST_INPUT\"] = 9] = \"REQUEST_INPUT\";\n AgentMessageType[AgentMessageType[\"IDLE\"] = 10] = \"IDLE\";\n AgentMessageType[AgentMessageType[\"TERMINATED\"] = 11] = \"TERMINATED\";\n AgentMessageType[AgentMessageType[\"STREAMING_CHUNK\"] = 12] = \"STREAMING_CHUNK\";\n AgentMessageType[AgentMessageType[\"BATCH_PROGRESS\"] = 13] = \"BATCH_PROGRESS\";\n AgentMessageType[AgentMessageType[\"RESTARTING\"] = 14] = \"RESTARTING\";\n})(AgentMessageType || (AgentMessageType = {}));\n// Type guards — check both message type and details shape for safety\nexport function isToolCallMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.THOUGHT &&\n !!details &&\n typeof details === 'object' &&\n typeof details.tool === 'string');\n}\n/** Extract the normalized resource references carried on a message's details, if any. */\nexport function getResourcesFromMessage(msg) {\n return normalizeAgentResources(msg.details?.resources);\n}\n// ============================================\n// TYPE GUARDS\n// ============================================\n/**\n * Check if a message is in compact format\n */\nexport function isCompactMessage(msg) {\n return typeof msg === 'object' && msg !== null && 't' in msg;\n}\n/**\n * Check if a message is in legacy format\n */\nexport function isLegacyMessage(msg) {\n return typeof msg === 'object' && msg !== null && 'type' in msg && !('t' in msg);\n}\n// ============================================\n// CONVERTERS\n// ============================================\n/**\n * Map old string enum values to AgentMessageType\n */\nconst STRING_TO_TYPE_MAP = {\n system: AgentMessageType.SYSTEM,\n thought: AgentMessageType.THOUGHT,\n plan: AgentMessageType.PLAN,\n update: AgentMessageType.UPDATE,\n complete: AgentMessageType.COMPLETE,\n warning: AgentMessageType.WARNING,\n error: AgentMessageType.ERROR,\n answer: AgentMessageType.ANSWER,\n question: AgentMessageType.QUESTION,\n request_input: AgentMessageType.REQUEST_INPUT,\n idle: AgentMessageType.IDLE,\n terminated: AgentMessageType.TERMINATED,\n streaming_chunk: AgentMessageType.STREAMING_CHUNK,\n batch_progress: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Map integer values to AgentMessageType (primary format)\n */\nconst INT_TO_TYPE_MAP = {\n 0: AgentMessageType.SYSTEM,\n 1: AgentMessageType.THOUGHT,\n 2: AgentMessageType.PLAN,\n 3: AgentMessageType.UPDATE,\n 4: AgentMessageType.COMPLETE,\n 5: AgentMessageType.WARNING,\n 6: AgentMessageType.ERROR,\n 7: AgentMessageType.ANSWER,\n 8: AgentMessageType.QUESTION,\n 9: AgentMessageType.REQUEST_INPUT,\n 10: AgentMessageType.IDLE,\n 11: AgentMessageType.TERMINATED,\n 12: AgentMessageType.STREAMING_CHUNK,\n 13: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Normalize message type from string or number to AgentMessageType\n */\nexport function normalizeMessageType(type) {\n // Handle integer type (current format and AgentMessageType enum values)\n if (typeof type === 'number') {\n return INT_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n // Handle string type (legacy messages from Redis with 90-day TTL)\n if (typeof type === 'string') {\n return STRING_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n return AgentMessageType.UPDATE;\n}\n/**\n * Convert legacy AgentMessage to CompactMessage\n */\nexport function toCompactMessage(legacy) {\n const compact = {\n t: normalizeMessageType(legacy.type),\n };\n if (legacy.message)\n compact.m = legacy.message;\n if (legacy.workstream_id && legacy.workstream_id !== 'main')\n compact.w = legacy.workstream_id;\n if (legacy.timestamp)\n compact.ts = legacy.timestamp;\n // Handle legacy streaming chunk details\n if (compact.t === AgentMessageType.STREAMING_CHUNK && legacy.details) {\n const d = legacy.details;\n if (d.is_final)\n compact.f = 1;\n // streaming_id and chunk_index are no longer needed\n }\n else if (legacy.details) {\n compact.d = legacy.details;\n }\n return compact;\n}\n/**\n * Parse any message format (compact or legacy) into CompactMessage.\n * Use this as the entry point for all received messages.\n */\nexport function parseMessage(data) {\n const parsed = typeof data === 'string' ? JSON.parse(data) : data;\n if (isCompactMessage(parsed))\n return parsed;\n if (isLegacyMessage(parsed))\n return toCompactMessage(parsed);\n throw new Error('Unknown message format');\n}\n/**\n * Create a compact message (convenience function for server-side)\n */\nexport function createCompactMessage(type, options = {}) {\n const compact = { t: type };\n if (options.message)\n compact.m = options.message;\n if (options.workstreamId && options.workstreamId !== 'main')\n compact.w = options.workstreamId;\n if (options.details)\n compact.d = options.details;\n if (options.isFinal)\n compact.f = 1;\n if (options.timestamp)\n compact.ts = options.timestamp;\n return compact;\n}\n/**\n * Convert CompactMessage back to AgentMessage (for UI components).\n * This allows UI to continue using familiar field names while wire format is compact.\n * @param compact The compact message to convert\n * @param workflowRunId Optional workflow_run_id (known from SSE context, not in compact format)\n */\nexport function toAgentMessage(compact, workflowRunId = '') {\n const message = {\n type: compact.t,\n timestamp: compact.ts || Date.now(),\n workflow_run_id: workflowRunId,\n message: compact.m || '',\n workstream_id: compact.w || 'main',\n };\n if (compact.d !== undefined && compact.d !== null)\n message.details = compact.d;\n // For streaming chunks, restore is_final and preserve an explicit streaming_id\n // when present. Older chunks fall back to workstream_id as their grouping key.\n if (compact.t === AgentMessageType.STREAMING_CHUNK) {\n const details = typeof compact.d === 'object' && compact.d !== null ? compact.d : {};\n const streamingId = typeof details.streaming_id === 'string' ? details.streaming_id : compact.w || 'main';\n const activityId = compact.i ?? (typeof details.activity_id === 'string' ? details.activity_id : undefined);\n message.details = {\n ...details,\n streaming_id: streamingId,\n is_final: compact.f === 1,\n ...(activityId ? { activity_id: activityId } : {}),\n };\n }\n return message;\n}\n/**\n * Status of a file being processed for conversation use.\n */\nexport var FileProcessingStatus;\n(function (FileProcessingStatus) {\n /** File is being uploaded to artifact storage */\n FileProcessingStatus[\"UPLOADING\"] = \"uploading\";\n /** File uploaded, text extraction in progress */\n FileProcessingStatus[\"PROCESSING\"] = \"processing\";\n /** File is ready for use in conversation */\n FileProcessingStatus[\"READY\"] = \"ready\";\n /** File processing failed */\n FileProcessingStatus[\"ERROR\"] = \"error\";\n})(FileProcessingStatus || (FileProcessingStatus = {}));\nexport const LOW_PRIORITY_TASK_QUEUE = 'low_priority';\n//# sourceMappingURL=workflow.js.map","/**\n * Rendering API types\n *\n * Types for rendering content to various formats (PDF, DOCX, images)\n */\nimport { WorkflowExecutionStatus } from './workflow.js';\nexport function getRenditionsPath(contentEtag, params) {\n return `renditions/${contentEtag}/${params.max_hw}`;\n}\nexport function isWorkflowTerminalStatus(status) {\n return (status === WorkflowExecutionStatus.COMPLETED ||\n status === WorkflowExecutionStatus.FAILED ||\n status === WorkflowExecutionStatus.CANCELED ||\n status === WorkflowExecutionStatus.TERMINATED ||\n status === WorkflowExecutionStatus.TIMED_OUT);\n}\n//# sourceMappingURL=rendering.js.map","/**\n * Agent Schedule Types\n *\n * Defines types for scheduling agents to run on a recurring basis using cron expressions.\n * Schedules are stored in MongoDB with execution handled by Temporal.\n */\n/**\n * Common cron expression presets for UI convenience.\n */\nexport const CRON_PRESETS = {\n EVERY_HOUR: '0 * * * *',\n EVERY_DAY_MIDNIGHT: '0 0 * * *',\n EVERY_DAY_9AM: '0 9 * * *',\n EVERY_MONDAY_MIDNIGHT: '0 0 * * MON',\n EVERY_WEEKDAY_9AM: '0 9 * * MON-FRI',\n FIRST_OF_MONTH: '0 0 1 * *',\n};\n/**\n * Human-readable descriptions for cron presets.\n */\nexport const CRON_PRESET_LABELS = {\n EVERY_HOUR: 'Every hour',\n EVERY_DAY_MIDNIGHT: 'Daily at midnight',\n EVERY_DAY_9AM: 'Daily at 9:00 AM',\n EVERY_MONDAY_MIDNIGHT: 'Every Monday at midnight',\n EVERY_WEEKDAY_9AM: 'Weekdays at 9:00 AM',\n FIRST_OF_MONTH: 'First day of month at midnight',\n};\n//# sourceMappingURL=schedule.js.map","export var ContentObjectApiHeaders;\n(function (ContentObjectApiHeaders) {\n ContentObjectApiHeaders[\"COLLECTION_ID\"] = \"x-collection-id\";\n ContentObjectApiHeaders[\"PROCESSING_PRIORITY\"] = \"x-processing-priority\";\n ContentObjectApiHeaders[\"CREATE_REVISION\"] = \"x-create-revision\";\n ContentObjectApiHeaders[\"REVISION_LABEL\"] = \"x-revision-label\";\n /**\n * @deprecated Events are now always emitted. This suppresses the Temporal-backed delivery targets (workflow, agent, and process) — webhook deliveries still fire.\n */\n ContentObjectApiHeaders[\"SUPPRESS_WORKFLOWS\"] = \"x-suppress-workflows\";\n})(ContentObjectApiHeaders || (ContentObjectApiHeaders = {}));\n/**\n * Headers for Data Store API calls.\n * Used for Cloud Run session affinity to route requests to the same instance.\n */\nexport var DataStoreApiHeaders;\n(function (DataStoreApiHeaders) {\n /** Data store ID for session affinity - routes requests for same store to same instance */\n DataStoreApiHeaders[\"DATA_STORE_ID\"] = \"x-data-store-id\";\n})(DataStoreApiHeaders || (DataStoreApiHeaders = {}));\nexport var ContentObjectStatus;\n(function (ContentObjectStatus) {\n ContentObjectStatus[\"created\"] = \"created\";\n ContentObjectStatus[\"processing\"] = \"processing\";\n ContentObjectStatus[\"ready\"] = \"ready\";\n ContentObjectStatus[\"completed\"] = \"completed\";\n ContentObjectStatus[\"failed\"] = \"failed\";\n ContentObjectStatus[\"archived\"] = \"archived\";\n})(ContentObjectStatus || (ContentObjectStatus = {}));\nexport var ContentNature;\n(function (ContentNature) {\n ContentNature[\"Video\"] = \"video\";\n ContentNature[\"Image\"] = \"image\";\n ContentNature[\"Audio\"] = \"audio\";\n ContentNature[\"Document\"] = \"document\";\n ContentNature[\"Code\"] = \"code\";\n ContentNature[\"Other\"] = \"other\";\n})(ContentNature || (ContentNature = {}));\nexport const POSTER_RENDITION_NAME = 'Poster';\nexport const AUDIO_RENDITION_NAME = 'Audio';\nexport const WEB_VIDEO_RENDITION_NAME = 'Web';\nexport const PDF_RENDITION_NAME = 'PDF';\nexport function getContentTypeRefId(type) {\n return type.id;\n}\nexport var WorkflowRuleInputType;\n(function (WorkflowRuleInputType) {\n WorkflowRuleInputType[\"single\"] = \"single\";\n WorkflowRuleInputType[\"multiple\"] = \"multiple\";\n WorkflowRuleInputType[\"none\"] = \"none\";\n})(WorkflowRuleInputType || (WorkflowRuleInputType = {}));\nexport var ImageRenditionFormat;\n(function (ImageRenditionFormat) {\n ImageRenditionFormat[\"jpeg\"] = \"jpeg\";\n ImageRenditionFormat[\"png\"] = \"png\";\n ImageRenditionFormat[\"webp\"] = \"webp\";\n})(ImageRenditionFormat || (ImageRenditionFormat = {}));\nexport const MarkdownRenditionFormat = {\n docx: 'docx',\n pdf: 'pdf',\n};\n/**\n * Matrix of supported content type → format conversions.\n * This is the authoritative source of truth for what renditions can be generated.\n *\n * Key patterns:\n * - Exact MIME types (e.g., 'application/pdf')\n * - Wildcard patterns (e.g., 'image/*', 'video/*')\n */\nconst RENDITION_COMPATIBILITY = {\n // Image formats can generate: jpeg, png, webp\n 'image/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Video formats can generate: jpeg, png (thumbnails)\n 'video/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png],\n // PDF can generate: jpeg, png, webp (page images)\n 'application/pdf': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Markdown can generate: pdf, docx (NOT jpeg/png)\n 'text/markdown': [MarkdownRenditionFormat.pdf, MarkdownRenditionFormat.docx],\n // Any text/* can generate: docx (editable export)\n 'text/*': [MarkdownRenditionFormat.docx],\n // Office documents can generate: pdf\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [MarkdownRenditionFormat.pdf],\n 'application/msword': [MarkdownRenditionFormat.pdf],\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': [MarkdownRenditionFormat.pdf],\n 'application/vnd.ms-powerpoint': [MarkdownRenditionFormat.pdf],\n};\n/**\n * Check if a specific rendition format can be generated from a content type.\n *\n * @param contentType - The MIME type of the source content (e.g., 'image/png', 'text/markdown')\n * @param format - The desired rendition format (e.g., ImageRenditionFormat.jpeg)\n * @returns true if the format can be generated from the content type\n *\n * @example\n * canGenerateRendition('image/png', ImageRenditionFormat.jpeg) // true\n * canGenerateRendition('text/markdown', ImageRenditionFormat.jpeg) // false\n * canGenerateRendition('text/markdown', MarkdownRenditionFormat.pdf) // true\n */\nexport function canGenerateRendition(contentType, format) {\n if (!contentType)\n return false;\n const formatStr = typeof format === 'string' ? format : format;\n // Check exact match first\n const exactMatch = RENDITION_COMPATIBILITY[contentType];\n if (exactMatch?.some((f) => f === formatStr)) {\n return true;\n }\n // Check wildcard patterns (e.g., 'image/*', 'video/*')\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch?.some((f) => f === formatStr)) {\n return true;\n }\n return false;\n}\nexport var ContentObjectProcessingPriority;\n(function (ContentObjectProcessingPriority) {\n ContentObjectProcessingPriority[\"normal\"] = \"normal\";\n ContentObjectProcessingPriority[\"low\"] = \"low\";\n})(ContentObjectProcessingPriority || (ContentObjectProcessingPriority = {}));\n/**\n * Get the list of rendition formats supported for a given content type.\n *\n * @param contentType - The MIME type of the source content\n * @returns Array of supported rendition formats, or empty array if none\n *\n * @example\n * getSupportedRenditionFormats('image/png') // [jpeg, png, webp]\n * getSupportedRenditionFormats('text/markdown') // [pdf, docx]\n * getSupportedRenditionFormats('text/html') // []\n */\nexport function getSupportedRenditionFormats(contentType) {\n if (!contentType)\n return [];\n // Check exact match first\n if (RENDITION_COMPATIBILITY[contentType]) {\n return [...RENDITION_COMPATIBILITY[contentType]];\n }\n // Check wildcard patterns\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch) {\n return [...wildcardMatch];\n }\n return [];\n}\n/**\n * Check if a content type supports visual (image) renditions.\n * This is useful for determining if a document can have thumbnails/previews.\n *\n * @param contentType - The MIME type of the source content\n * @returns true if the content type can generate JPEG renditions\n *\n * @example\n * supportsVisualRendition('image/png') // true\n * supportsVisualRendition('application/pdf') // true\n * supportsVisualRendition('text/markdown') // false\n */\nexport function supportsVisualRendition(contentType) {\n return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);\n}\n//# sourceMappingURL=store.js.map","export const REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE = 'requested_scope_unavailable';\nexport const NO_ACCESSIBLE_ACCOUNT_ERROR_CODE = 'no_accessible_account';\nexport const RESTRICTED_ENVIRONMENT_ERROR_CODE = 'restricted_environment';\nexport const TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE = 'token_issuance_forbidden';\nexport const ISSUE_TOKEN_FORBIDDEN_ERROR_CODES = [\n REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE,\n NO_ACCESSIBLE_ACCOUNT_ERROR_CODE,\n RESTRICTED_ENVIRONMENT_ERROR_CODE,\n TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE,\n];\n//# sourceMappingURL=sts-errors.js.map","export var TrainingSessionStatus;\n(function (TrainingSessionStatus) {\n TrainingSessionStatus[\"created\"] = \"created\";\n TrainingSessionStatus[\"building\"] = \"building\";\n TrainingSessionStatus[\"prepared\"] = \"prepared\";\n TrainingSessionStatus[\"processing\"] = \"processing\";\n TrainingSessionStatus[\"completed\"] = \"completed\";\n TrainingSessionStatus[\"cancelled\"] = \"cancelled\";\n TrainingSessionStatus[\"failed\"] = \"failed\";\n})(TrainingSessionStatus || (TrainingSessionStatus = {}));\n//# sourceMappingURL=training.js.map","/**\n * Transient-token values that exist at runtime.\n *\n * Split out of `transient-tokens.ts` so `api-schemas/invites.ts` can read the enum without importing\n * a module that derives its types from those very schemas. Re-exported from `transient-tokens.ts`.\n */\nexport var TransientTokenType;\n(function (TransientTokenType) {\n TransientTokenType[\"userInvite\"] = \"user-invite\";\n TransientTokenType[\"migration\"] = \"migration\";\n})(TransientTokenType || (TransientTokenType = {}));\n//# sourceMappingURL=transient-tokens-values.js.map","/**\n * Account values that exist at runtime — enums, constants, and the pure helpers over them.\n *\n * Split out of `user.ts` so the dependency direction can run one way. The API schemas need these\n * values (`z.enum(BillingMethod)`, `.max(ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH)`), and `user.ts`\n * needs the types the schemas infer. Both living in `user.ts` would make it import from a module\n * that imports it back; here, `user.ts` and `api-schemas/account.ts` both depend on this module and\n * nothing depends on them.\n *\n * Everything here is re-exported from `user.ts`, so existing import paths keep working — this is a\n * move, not a rename.\n */\nexport var Datacenters;\n(function (Datacenters) {\n Datacenters[\"aws\"] = \"aws\";\n Datacenters[\"gcp\"] = \"gcp\";\n Datacenters[\"azure\"] = \"azure\";\n})(Datacenters || (Datacenters = {}));\nexport var BillingMethod;\n(function (BillingMethod) {\n BillingMethod[\"stripe\"] = \"stripe\";\n BillingMethod[\"invoice\"] = \"invoice\";\n})(BillingMethod || (BillingMethod = {}));\nexport var AccountType;\n(function (AccountType) {\n AccountType[\"vertesia\"] = \"vertesia\";\n AccountType[\"partner\"] = \"partner\";\n AccountType[\"free\"] = \"free\";\n AccountType[\"customer\"] = \"customer\";\n AccountType[\"prospect\"] = \"prospect\";\n AccountType[\"unknown\"] = \"unknown\";\n})(AccountType || (AccountType = {}));\n/**\n * Quota/rate-limit tier assigned to an account. Code-defined tiers live in `@dglabs/quota`\n * (`QUOTA_TIERS`); these names must match its keys.\n * - `standard` — protective baseline limits (the default for most accounts).\n * - `enterprise` — high limits for contracted customers / internal / partners.\n *\n * An account with no explicit `quota_tier` derives its tier from its `account_type`.\n */\nexport var QuotaTier;\n(function (QuotaTier) {\n QuotaTier[\"standard\"] = \"standard\";\n QuotaTier[\"enterprise\"] = \"enterprise\";\n})(QuotaTier || (QuotaTier = {}));\nexport const ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH = 1000;\n//# sourceMappingURL=account-values.js.map","export * from './account-values.js';\nexport const UserRefPopulate = 'id name email picture';\n/**\n * Annotation marker (stored in {@link User.annotations}) that grants a user access to\n * non-production environments (`preview`, `preprod`). See\n * `docs/restrict-access-to-non-production-envs.md`.\n */\nexport const EARLY_ACCESS_ANNOTATION = 'early-access';\n/**\n * Business error code returned by the STS (token server) when a user is denied access to a\n * restricted (`preview`/`preprod`) environment because they lack the {@link EARLY_ACCESS_ANNOTATION}\n * annotation. The UI keys its dedicated rejection screen off this code.\n */\nexport { RESTRICTED_ENVIRONMENT_ERROR_CODE } from './sts-errors.js';\nexport const AccountRefPopulate = 'id name';\n//# sourceMappingURL=user.js.map","export function getTenantId(accountId, projectId) {\n //use the last 6 characters of the accountId as the db name\n //as in mongo the last 6 char are an incrementing counter\n const accountLast6 = accountId.slice(-6);\n const projectLast6 = projectId.slice(-6);\n return `${accountLast6}_${projectLast6}`;\n}\nexport function getTenantIdFromProject(project) {\n return getTenantId(project.account, project.id);\n}\n//# sourceMappingURL=auth.js.map","export function mergeInCodePromptSchemas(prompts) {\n const props = {};\n const required = new Set();\n for (const prompt of prompts) {\n if (prompt.schema?.properties) {\n const schema = prompt.schema;\n if (schema.required) {\n for (const prop of schema.required) {\n required.add(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n }\n const schema = Object.keys(props).length > 0\n ? {\n properties: props,\n required: Array.from(required),\n }\n : null;\n return schema;\n}\n//# sourceMappingURL=schemas.js.map","/**\n * The header a caller names an API version in, as `YYYYMMDD` — see {@link ApiVersions}.\n *\n * Declared here rather than in the client, because both ends of the negotiation need it: the\n * servers register it with `withVersionHeader` and read it when deciding how strictly to hold a\n * request to its published schema, and `@vertesia/client` sets it on every call. It kept the\n * spelling it has always had on the wire.\n */\nexport const VERSION_HEADER = 'x-api-version';\nexport var ApiVersions;\n(function (ApiVersions) {\n ApiVersions[ApiVersions[\"COMPLETION_RESULT_V1\"] = 20250925] = \"COMPLETION_RESULT_V1\";\n ApiVersions[ApiVersions[\"DOWNLOAD_URL_NO_MIME_TYPE_V1\"] = 20260210] = \"DOWNLOAD_URL_NO_MIME_TYPE_V1\";\n ApiVersions[ApiVersions[\"MEDIA_BLOB_STORAGE_V1\"] = 20260319] = \"MEDIA_BLOB_STORAGE_V1\";\n /**\n * Request bodies and parameters are rejected when they do not match the published component.\n *\n * The endpoints did not change shape at this date — the schemas they had always published\n * started being enforced. A body carrying an undeclared property against a closed component,\n * or a query parameter of the wrong type, used to be accepted and silently ignored; from here\n * it is a 400.\n *\n * Unlike the milestones above, this one is not about a route: it gates the enforcement policy\n * itself, so a caller pinned below it gets the old lenient behaviour on EVERY endpoint while\n * the mismatch is logged. Sending nothing means the current API, so the strict reading is what\n * a new caller gets by default and leniency has to be asked for.\n */\n ApiVersions[ApiVersions[\"REQUEST_CONTRACT_ENFORCEMENT_V1\"] = 20260803] = \"REQUEST_CONTRACT_ENFORCEMENT_V1\";\n})(ApiVersions || (ApiVersions = {}));\n/**\n * The API version used by current clients and published as the current OpenAPI shape.\n *\n * Keep this explicit rather than deriving it at runtime: promoting a milestone to the client\n * default is a deliberate compatibility decision. The versions test ensures this alias is\n * reconsidered whenever a newer milestone is added.\n */\nexport const CURRENT_API_VERSION = ApiVersions.REQUEST_CONTRACT_ENFORCEMENT_V1;\n/** The current API version formatted for the {@link VERSION_HEADER} wire value. */\nexport const CURRENT_API_VERSION_HEADER_VALUE = String(CURRENT_API_VERSION);\n//# sourceMappingURL=versions.js.map","export const VIEW_EXPERIENCE_SCHEMA_VERSION = 1;\n/** Build the generic reusable client route for a persisted, system, or app-contributed View. */\nexport function viewExperienceRoute(id) {\n return `/view/${encodeURIComponent(id)}`;\n}\nexport const VIEW_SEARCH_FIELD_TYPES = ['text', 'keyword', 'number', 'date', 'boolean'];\nexport const VIEW_AGENTIC_SEARCH_MODES = ['query', 'query_and_view'];\nexport const VIEW_RESULT_FIELD_FORMATS = [\n 'text',\n 'date',\n 'number',\n 'badge',\n 'user',\n 'content_type',\n 'location',\n];\nexport const VIEW_SELECTION_MODES = ['single', 'multiple'];\nexport const VIEW_ACTION_PLACEMENTS = ['toolbar', 'row', 'selection'];\nexport const VIEW_ACTION_SELECTION_REQUIREMENTS = ['none', 'single', 'multiple', 'any'];\n//# sourceMappingURL=views.js.map","/**\n * Agent Observability Telemetry Types\n *\n * These types define the event-based model for agent observability.\n */\n// ============================================================================\n// Enums\n// ============================================================================\n/**\n * Types of telemetry events\n */\nexport var AgentEventType;\n(function (AgentEventType) {\n AgentEventType[\"AgentRunStarted\"] = \"agent_run_started\";\n AgentEventType[\"AgentRunCompleted\"] = \"agent_run_completed\";\n AgentEventType[\"LlmCall\"] = \"llm_call\";\n AgentEventType[\"ToolCall\"] = \"tool_call\";\n})(AgentEventType || (AgentEventType = {}));\n/**\n * Types of LLM calls in a conversation\n */\nexport var LlmCallType;\n(function (LlmCallType) {\n /** Initial conversation start */\n LlmCallType[\"Start\"] = \"start\";\n /** Resuming with tool results */\n LlmCallType[\"ResumeTools\"] = \"resume_tools\";\n /** Resuming with user message */\n LlmCallType[\"ResumeUser\"] = \"resume_user\";\n /** Checkpoint resume (after conversation summarization) */\n LlmCallType[\"Checkpoint\"] = \"checkpoint\";\n /** Nested interaction call from within tools */\n LlmCallType[\"NestedInteraction\"] = \"nested_interaction\";\n})(LlmCallType || (LlmCallType = {}));\n/**\n * Types of tools that can be called\n */\nexport var TelemetryToolType;\n(function (TelemetryToolType) {\n /** Built-in tools (e.g., plan, search) */\n TelemetryToolType[\"Builtin\"] = \"builtin\";\n /** Interaction-based tools */\n TelemetryToolType[\"Interaction\"] = \"interaction\";\n /** Remote/MCP tools */\n TelemetryToolType[\"Remote\"] = \"remote\";\n /** Skill tools */\n TelemetryToolType[\"Skill\"] = \"skill\";\n})(TelemetryToolType || (TelemetryToolType = {}));\n//# sourceMappingURL=workflow-analytics.js.map"],"mappings":"AAYA,IAAW,GACV,SAAU,EAAY,CACnB,EAAW,SAAc,mBACzB,EAAW,UAAe,oBAC1B,EAAW,WAAgB,qBAC3B,EAAW,YAAiB,sBAC5B,EAAW,SAAc,WACzB,EAAW,UAAe,YAC1B,EAAW,UAAe,oBAC1B,EAAW,WAAgB,aAC3B,EAAW,cAAmB,gBAC9B,EAAW,yBAA8B,2BACzC,EAAW,uBAA4B,yBACvC,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,oBAAyB,sBACpC,EAAW,eAAoB,iBAC/B,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,cAAmB,gBAC9B,EAAW,cAAmB,gBAC9B,EAAW,eAAoB,kBAE/B,E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,EACT,YAAa,2CACjB,EACA,mBAAoB,CAChB,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,oDACjB,CACJ,EACA,qBAAsB,GACtB,YAAa,wIACjB,EACA,aAAc,CACV,KAAM,SACN,WAAY,CACR,QAAS,CACL,KAAM,SACV,EACA,MAAO,CACH,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,UAAW,CACP,KAAM,SACN,QAAS,EACT,QAAS,CACb,EACA,YAAa,CACT,KAAM,UACN,QAAS,EACT,QAAS,UACb,EACA,QAAS,CACL,KAAM,SACN,KAAM,CAAC,OAAQ,OAAO,CAC1B,CACJ,EACA,qBAAsB,EAC1B,EACA,UAAW,CACP,KAAM,+CACN,YAAa,0EACjB,CACJ,EACA,qBAAsB,GACtB,YAAa,4DACjB,EACA,mBAAoB,CAChB,KAAM,SACN,YAAa,gFACjB,EACA,WAAY,CACR,KAAM,kCACN,YAAa,6EACjB,EACA,aAAc,CACV,KAAM,UACN,YAAa,4EACjB,EACA,aAAc,CACV,KAAM,SACN,KAAM,CAAC,OAAQ,OAAQ,MAAO,QAAS,YAAY,EACnD,YAAa,gDACjB,CACJ,EACA,qBAAsB,GACtB,YAAa,6DACb,MAAO,CACH,wBAAyB,CACrB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,oBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,KAAM,CACF,KAAM,QACV,EACA,aAAc,CACV,KAAM,SACN,KAAM,CAAC,MAAO,OAAQ,MAAM,CAChC,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,mBAAoB,CAChB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,cACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,qBAAsB,CAClB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,gBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,uBAAwB,CACpB,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,SACV,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,OAAQ,QAAS,KAAK,CAClD,EACA,cAAe,CACX,KAAM,SACV,EACA,UAAW,CACP,KAAM,SACN,KAAM,CAAC,KAAM,IAAI,CACrB,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,4BAA6B,CACzB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,wBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,uBAAwB,CACpB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,kBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,qBAAsB,CAClB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,MAAM,CAClC,EACA,kBAAmB,CACf,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,oCAAqC,CACjC,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iCACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,MAAM,CAClC,EACA,iBAAkB,CACd,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,MAAM,CAClC,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,2BAA4B,CACxB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,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EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,mBAAoB,CAChB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,cACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,sBAAuB,CACnB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,WAAY,CACR,KAAM,QACV,EACA,KAAM,CACF,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,6BAA8B,kBAAmB,yBAAyB,CACrF,EACA,qCAAsC,CAClC,KAAM,SACN,WAAY,CACR,QAAS,CACL,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,YAAa,6EACjB,EACA,UAAW,CACP,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,2BACjB,EACA,UAAW,CACP,KAAM,UACN,YAAa,sDACjB,EACA,WAAY,CACR,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,SAAU,KAAK,EACtB,YAAa,wNACjB,EACA,aAAc,CACV,KAAM,SACN,QAAS,EACT,YAAa,qMACjB,EACA,iBAAkB,CACd,KAAM,UACN,YAAa,iHACjB,EACA,aAAc,CACV,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,8DACjB,EACA,kBAAmB,CACf,KAAM,UACN,YAAa,uEACjB,EACA,OAAQ,CACJ,KAAM,4CACN,YAAa,6EACjB,EACA,YAAa,CACT,KAAM,4CACN,YAAa,8DACjB,EACA,mBAAoB,CAChB,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,oEACjB,EACA,qBAAsB,CAClB,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,kGACjB,EACA,YAAa,CACT,KAAM,UACN,YAAa,gFACjB,EACA,OAAQ,CACJ,KAAM,qDACN,YAAa,uCACjB,CACJ,EACA,qBAAsB,EAC1B,EACA,2CAA4C,CACxC,KAAM,SACN,WAAY,CACR,QAAS,CACL,KAAM,UACN,YAAa,wEACjB,EACA,OAAQ,CACJ,KAAM,4CACN,YAAa,2DACjB,EACA,UAAW,CACP,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,+EACjB,EACA,mBAAoB,CAChB,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,sHACjB,EACA,MAAO,CACH,KAAM,UACN,YAAa,oCACjB,CACJ,EACA,qBAAsB,EAC1B,EACA,wBAAyB,CACrB,KAAM,SACN,WAAY,CACR,KAAM,CACF,KAAM,SACV,EACA,MAAO,CACH,KAAM,SACV,EACA,WAAY,CACR,KAAM,SACV,CACJ,EACA,qBAAsB,EAC1B,EACA,YAAa,CACT,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,wBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iB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A,YAAa,CACT,KAAM,SACN,KAAM,CACF,sBACA,sBACA,uBACA,sBACJ,CACJ,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,eAAgB,CACZ,KAAM,SACN,KAAM,CACF,aACA,4BACA,8BACA,mBACA,qBACA,wBACA,sBACA,2BACA,wBACJ,CACJ,EACA,iBAAkB,CACd,KAAM,QACN,MAAO,CACH,SAAU,EACV,SAAU,EACV,KAAM,QACN,MAAO,CACH,KAAM,UACN,QAAS,YACT,QAAS,UACb,CACJ,EACA,YAAa,kKACjB,EACA,gBAAiB,CACb,KAAM,SACN,KAAM,CAAC,MAAO,SAAS,EACvB,YAAa,yQACjB,EACA,mBAAoB,CAChB,KAAM,SACN,KAAM,CAAC,MAAO,WAAY,MAAM,EAChC,YAAa,iOACjB,EACA,kCAAmC,CAC/B,KAAM,SACN,WAAY,CACR,GAAI,CACA,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,YAAa,CACT,KAAM,SACV,EACA,SAAU,CACN,KAAM,6BACV,EACA,WAAY,CACR,KAAM,qBACV,EACA,cAAe,CACX,KAAM,sBACV,EACA,iBAAkB,CACd,KAAM,SACN,YAAa,gEACjB,EACA,kBAAmB,CACf,KAAM,0BACN,YAAa,qJACjB,EACA,yBAA0B,CACtB,KAAM,UACN,QAAS,GACT,QAAS,iBACT,YAAa,oIACjB,EACA,2BAA4B,CACxB,KAAM,UACN,YAAa,uGACjB,EACA,aAAc,CACV,KAAM,6BACN,YAAa,wDACjB,CACJ,EACA,qBAAsB,EAC1B,EACA,mBAAoB,CAChB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,cACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,OAAQ,MAAM,CACzB,EACA,YAAa,CACT,KAAM,UACN,QAAS,kBACT,QAAS,gBACb,EACA,YAAa,CACT,KAAM,SACV,EACA,oBAAqB,CACjB,KAAM,SACV,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,OAAQ,OAAQ,MAAO,UAAU,CAC5C,EACA,YAAa,CACT,KAAM,SACN,MAAO,WACX,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,aAAc,CACV,MAAO,CACH,CACI,KAAM,6BACV,EACA,CACI,KAAM,iCACV,EACA,CACI,KAAM,uBACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,wCACV,EACA,CACI,KAAM,6BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,gCACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,qCACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,kCACV,EACA,CACI,KAAM,uCACV,EACA,CACI,KAAM,6CACV,EACA,CACI,KAAM,oCACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,6BACV,EACA,CACI,KAAM,qBACV,EACA,CACI,KAAM,4BACV,CACJ,CACJ,EACA,kBAAmB,CACf,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,qBACX,EACA,SAAU,CACN,KAAM,SACN,KAAM,CACF,aACA,qCACA,0BACA,kBACA,aACA,cACA,oBACJ,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,OAAQ,CACJ,KAAM,QACV,EACA,QAAS,CACL,K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AAQ,UAAW,SAAU,OAAQ,SAAS,EACzE,GAA4B,CAAC,QAAS,gBAAgB,EACtD,GAA4B,CACrC,OACA,OACA,SACA,QACA,OACA,eACA,UACJ,EACa,GAAuB,CAAC,SAAU,UAAU,EAC5C,GAAyB,CAAC,UAAW,MAAO,WAAW,EACvD,GAAqC,CAAC,OAAQ,SAAU,WAAY,KAAK,ECPtF,IAAW,IACV,SAAU,EAAgB,CACvB,EAAe,gBAAqB,oBACpC,EAAe,kBAAuB,sBACtC,EAAe,QAAa,WAC5B,EAAe,SAAc,WACjC,EAAA,CAAG,AAAmB,KAAiB,CAAC,CAAE,EAI1C,IAAW,IACV,SAAU,EAAa,CAEpB,EAAY,MAAW,QAEvB,EAAY,YAAiB,eAE7B,EAAY,WAAgB,cAE5B,EAAY,WAAgB,aAE5B,EAAY,kBAAuB,oBACvC,EAAA,CAAG,AAAgB,KAAc,CAAC,CAAE,EAIpC,IAAW,IACV,SAAU,EAAmB,CAE1B,EAAkB,QAAa,UAE/B,EAAkB,YAAiB,cAEnC,EAAkB,OAAY,SAE9B,EAAkB,MAAW,OACjC,EAAA,CAAG,AAAsB,KAAoB,CAAC,CAAE"}
|
|
1
|
+
{"version":3,"file":"vertesia-common.js","names":["RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","ref"],"sources":["access-control-values.js","access-control.js","apikey-values.js","apikey.js","appgen.js","apps.js","audit-trail.js","data-platform.js","email.js","../../../llumiverse/common/lib/capability/anthropic.js","../../../llumiverse/common/lib/options/version-parsing.js","../../../llumiverse/common/lib/capability/azure_foundry.js","../../../llumiverse/common/lib/capability/bedrock-models.js","../../../llumiverse/common/lib/capability/mistral.js","../../../llumiverse/common/lib/capability/openai.js","../../../llumiverse/common/lib/capability/vertexai.js","../../../llumiverse/common/lib/options/context-windows.js","../../../llumiverse/common/lib/types.js","../../../llumiverse/common/lib/model-directory.js","../../../llumiverse/common/lib/capability.js","../../../llumiverse/common/lib/options/fallback.js","../../../llumiverse/common/lib/options/vertexai.js","environment.js","group.js","integrations.js","interaction-values.js","interaction.js","oauth-scopes.js","platform-event.js","project-values.js","project.js","prompt.js","refs.js","schema-for-extraction.js","store/agent-approval.js","store/collections.js","store/conversation-state.js","store/dsl-workflow.js","store/editing-policy-schema.generated.js","store/intake-policy-schema.generated.js","store/process.js","store/workflow.js","store/rendering.js","store/schedule.js","store/store.js","sts-errors.js","training.js","transient-tokens-values.js","account-values.js","user.js","utils/auth.js","utils/schemas.js","versions.js","views.js","workflow-analytics.js"],"sourcesContent":["/**\n * Access-control values that exist at runtime — the enums and the scope list.\n *\n * Split out of `access-control.ts` and `roles/types.ts` for the same reason `account-values.ts` was\n * split out of `user.ts`: the API schemas need these values (`z.enum(Permission)`,\n * `z.enum(AbacScopes)`) while those two modules need the types the schemas infer. Keeping them where\n * they were would make each import a module that imports it back; here, both sides depend on this\n * module and nothing depends on them.\n *\n * Everything is re-exported from its original module, so existing import paths keep working — this\n * is a move, not a rename.\n */\nexport var Permission;\n(function (Permission) {\n Permission[\"int_read\"] = \"interaction:read\";\n Permission[\"int_write\"] = \"interaction:write\";\n Permission[\"int_delete\"] = \"interaction:delete\";\n Permission[\"int_execute\"] = \"interaction:execute\";\n Permission[\"run_read\"] = \"run:read\";\n Permission[\"run_write\"] = \"run:write\";\n Permission[\"env_admin\"] = \"environment:admin\";\n Permission[\"app_manage\"] = \"app:manage\";\n Permission[\"project_admin\"] = \"project:admin\";\n Permission[\"project_integration_read\"] = \"project:integration_read\";\n Permission[\"project_settings_write\"] = \"project:settings_write\";\n Permission[\"api_key_create\"] = \"api_key:create\";\n Permission[\"api_key_read\"] = \"api_key:read\";\n Permission[\"api_key_secret_read\"] = \"api_key:secret_read\";\n Permission[\"api_key_update\"] = \"api_key:update\";\n Permission[\"api_key_delete\"] = \"api_key:delete\";\n Permission[\"account_read\"] = \"account:read\";\n Permission[\"account_write\"] = \"account:write\";\n Permission[\"account_admin\"] = \"account:admin\";\n Permission[\"manage_billing\"] = \"account:billing\";\n /** View cost and usage analytics */\n Permission[\"billing_read\"] = \"billing:read\";\n /** View account and project audit events. */\n Permission[\"audit_read\"] = \"audit:read\";\n Permission[\"account_member\"] = \"account:member\";\n Permission[\"content_read\"] = \"content:read\";\n Permission[\"content_read_all\"] = \"content:read_all\";\n Permission[\"content_write\"] = \"content:write\";\n Permission[\"content_delete\"] = \"content:delete\";\n Permission[\"content_admin\"] = \"content:admin\";\n Permission[\"content_superadmin\"] = \"content:superadmin\";\n Permission[\"workflow_read\"] = \"workflow:read\";\n Permission[\"workflow_run\"] = \"workflow:run\";\n Permission[\"workflow_admin\"] = \"workflow:admin\";\n Permission[\"workflow_superadmin\"] = \"workflow:superadmin\";\n Permission[\"agent_run_read\"] = \"agent_run:read\";\n Permission[\"task_read\"] = \"task:read\";\n Permission[\"task_manage\"] = \"task:manage\";\n Permission[\"iam_impersonate\"] = \"iam:impersonate\";\n /** whether the user has access to Sutdio App. */\n Permission[\"studio_access\"] = \"studio:access\";\n})(Permission || (Permission = {}));\nexport var AccessControlResourceType;\n(function (AccessControlResourceType) {\n AccessControlResourceType[\"project\"] = \"project\";\n AccessControlResourceType[\"environment\"] = \"environment\";\n AccessControlResourceType[\"account\"] = \"account\";\n AccessControlResourceType[\"interaction\"] = \"interaction\";\n AccessControlResourceType[\"app\"] = \"application\";\n /**\n * Dynamic resource matching by property conditions at query time. The role\n * partitions (content, future tasks/etc.) determine which kind of object\n * the conditions match — selected via `AceConditions.scope`.\n *\n * NOTE: the string value remains `'content_set'` for backward compatibility\n * with stored ACEs and JWTs. The wire/DB rename to `'resource_set'` is a\n * separate concern (deferred). Until then, code reads\n * `AccessControlResourceType.resource_set` but the value on the wire stays\n * `'content_set'`.\n */\n AccessControlResourceType[\"resource_set\"] = \"content_set\";\n})(AccessControlResourceType || (AccessControlResourceType = {}));\nexport var AccessControlPrincipalType;\n(function (AccessControlPrincipalType) {\n AccessControlPrincipalType[\"user\"] = \"user\";\n AccessControlPrincipalType[\"group\"] = \"group\";\n AccessControlPrincipalType[\"apikey\"] = \"apikey\";\n /** Dynamic principal matching by user/group properties at token time. */\n AccessControlPrincipalType[\"principal_set\"] = \"principal_set\";\n})(AccessControlPrincipalType || (AccessControlPrincipalType = {}));\n/**\n * Kind of object a ResourceSet's `resource_props` matches at query time. Used\n * in `AceConditions.scope` (validated at runtime against this list) and as\n * the prefix in JWT `content_security` keys (e.g. `collection:read`).\n *\n * Each scope is owned by exactly one partition. When adding a new partition\n * (e.g. tasks), extend this list with the new scope(s) AND extend `RoleDomain`\n * with the new domain.\n */\nexport const AbacScopes = ['document', 'collection', 'task'];\n/**\n * Logical grouping of roles by the service area that owns them. Declared as a\n * runtime list so the role schemas can publish it as an enum component; the\n * `RoleDomain` type is inferred from it in `roles/types.ts`.\n */\nexport const RoleDomains = ['system', 'content', 'tasks'];\n//# sourceMappingURL=access-control-values.js.map","/**\n * The enums live in `./access-control-values.js` so the API schemas can consume them without\n * importing this module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './access-control-values.js';\n/** Human-readable labels for each security level, indexed by numeric value. */\nexport const SecurityLevelLabels = ['Public', 'Internal', 'Confidential', 'Restricted', 'Secret'];\n//# sourceMappingURL=access-control.js.map","/**\n * API key values that exist at runtime.\n *\n * Split out of `apikey.ts` so `api-schemas/apikey.ts` can read the enum without importing a module\n * that derives its types from those very schemas. Re-exported from `apikey.ts`.\n */\nexport var ApiKeyTypes;\n(function (ApiKeyTypes) {\n ApiKeyTypes[\"secret\"] = \"sk\";\n})(ApiKeyTypes || (ApiKeyTypes = {}));\n//# sourceMappingURL=apikey-values.js.map","/**\n * `ApiKeyTypes` lives in `./apikey-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './apikey-values.js';\nexport var PrincipalType;\n(function (PrincipalType) {\n PrincipalType[\"User\"] = \"user\";\n PrincipalType[\"OAuthAccess\"] = \"oauth_access\";\n PrincipalType[\"Group\"] = \"group\";\n PrincipalType[\"ApiKey\"] = \"apikey\";\n PrincipalType[\"ServiceAccount\"] = \"service_account\";\n PrincipalType[\"Agent\"] = \"agent\";\n PrincipalType[\"Schedule\"] = \"schedule\";\n})(PrincipalType || (PrincipalType = {}));\n//# sourceMappingURL=apikey.js.map","export const APPGEN_PACKAGE_SPEC_PATTERN_SOURCE = '^(?:latest|dev|dev-[0-9]+\\\\.[0-9]+|snapshot-[0-9a-f]{7}|[0-9]+\\\\.[0-9]+\\\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\\\+[0-9A-Za-z.-]+)?)$';\nexport const APPGEN_PACKAGE_SPEC_PATTERN = new RegExp(APPGEN_PACKAGE_SPEC_PATTERN_SOURCE);\n//# sourceMappingURL=appgen.js.map","/** Allowed values for AppUINavItem.preferredSection */\nexport const PREFERRED_SECTIONS = ['default', 'footer', 'settings'];\nfunction deriveMCPCollectionId(input) {\n return input\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/_+/g, '_');\n}\n/**\n * Normalizes a tool collection to the object format.\n * Applies optional `{{var}}` substitution to the URL so manifests can reference\n * deployment-time variables like `{{studio_ui}}`.\n *\n * @param collection - ToolCollectionObject\n * @param vars - Optional endpoint variables to substitute in URLs\n * @returns Normalized ToolCollectionObject\n */\nexport function normalizeToolCollection(collection, vars) {\n if (!collection || typeof collection !== 'object') {\n throw new TypeError('Tool collection must be an object');\n }\n const substitutedUrl = vars && collection.url ? substituteEndpoints(collection.url, vars) : collection.url;\n const urlChanged = substitutedUrl !== collection.url;\n if (collection.type === 'mcp') {\n const fallbackId = deriveMCPCollectionId(collection.id || collection.name || collection.url);\n if (urlChanged || !collection.id) {\n return {\n ...collection,\n url: substitutedUrl,\n id: collection.id || fallbackId,\n };\n }\n }\n else if (urlChanged) {\n return { ...collection, url: substitutedUrl };\n }\n return collection;\n}\n/**\n * Canonical app capabilities Studio renders/supports. The public type is derived from\n * this list so runtime validation and TypeScript cannot drift.\n */\nexport const APP_CAPABILITIES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n];\n/**\n * Header carrying the app version a generated-app UI is running, so studio/zeno resolve app-owned\n * capability refs (`app:<app>:...`) against that exact version instead of the promoted version.\n * Resolution-time only; never persisted. Set by the generated app template via client.withAppVersion.\n */\nexport const APP_VERSION_HEADER = 'x-vertesia-app-version';\n/**\n * Substitutes `{{key}}` placeholders in a URL with the matching endpoint.\n * Unknown placeholders are left untouched (so failures surface as fetch errors\n * with the unresolved placeholder visible, rather than silently pointing nowhere).\n * Trailing slashes on replacement values are stripped to avoid `//api/...` joins.\n */\nfunction substituteEndpoints(url, endpoints) {\n if (!url || !endpoints)\n return url;\n return url.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (match, key) => {\n const value = endpoints[key];\n if (typeof value !== 'string' || !value)\n return match;\n return trimTrailingSlashes(value);\n });\n}\nfunction trimTrailingSlashes(value) {\n let end = value.length;\n while (end > 0 && value[end - 1] === '/') {\n end--;\n }\n return end === value.length ? value : value.slice(0, end);\n}\n/**\n * Canonical package scopes, including the catch-all `all`. The public type is derived\n * from this list so request parsing and TypeScript cannot drift.\n */\nexport const APP_PACKAGE_SCOPES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n 'settings',\n 'widgets',\n 'activities',\n 'hooks',\n 'subscriptions',\n 'all',\n];\n//# sourceMappingURL=apps.js.map","export const AUDIT_ACTIONS = [\n // CRUD operations\n 'create',\n 'update',\n 'delete',\n 'bulk_create',\n 'bulk_change_type',\n 'bulk_update',\n 'bulk_delete',\n 'attach',\n 'detach',\n 'credentials_fill',\n 'credentials_totp_generation',\n 'publish',\n 'unpublish',\n // Billable operations\n 'inference',\n 'embedding',\n 'image_generation',\n // Content processing outcomes\n 'document_processed',\n];\nexport const AUDIT_AGGREGATION_DIMENSIONS = [\n 'time',\n 'action',\n 'resource_type',\n 'event_category',\n 'provider',\n 'project_id',\n 'details.pipeline',\n 'details.verdict',\n 'details.workflow_type',\n 'details.rule_id',\n 'model',\n];\n/** Billable audit actions for cost analytics queries */\nexport const BILLABLE_AUDIT_ACTIONS = ['inference', 'embedding', 'image_generation'];\n//# sourceMappingURL=audit-trail.js.map","// ============================================================================\n// Column Types\n// ============================================================================\n/**\n * Supported column data types for DuckDB tables.\n */\nexport const DataColumnType = {\n STRING: 'STRING',\n INTEGER: 'INTEGER',\n BIGINT: 'BIGINT',\n FLOAT: 'FLOAT',\n DOUBLE: 'DOUBLE',\n DECIMAL: 'DECIMAL',\n BOOLEAN: 'BOOLEAN',\n DATE: 'DATE',\n TIMESTAMP: 'TIMESTAMP',\n JSON: 'JSON',\n};\n/**\n * Semantic types that provide AI agents with context about column meaning.\n */\nexport const SemanticColumnType = {\n EMAIL: 'email',\n PHONE: 'phone',\n URL: 'url',\n CURRENCY: 'currency',\n PERCENTAGE: 'percentage',\n PERSON_NAME: 'person_name',\n ADDRESS: 'address',\n COUNTRY: 'country',\n DATE_ISO: 'date_iso',\n IDENTIFIER: 'identifier',\n};\n/**\n * Mapping from DataColumnType to DuckDB SQL types.\n */\nexport const DATA_COLUMN_TYPE_TO_DUCKDB = {\n [DataColumnType.STRING]: 'VARCHAR',\n [DataColumnType.INTEGER]: 'INTEGER',\n [DataColumnType.BIGINT]: 'BIGINT',\n [DataColumnType.FLOAT]: 'FLOAT',\n [DataColumnType.DOUBLE]: 'DOUBLE',\n [DataColumnType.DECIMAL]: 'DECIMAL(18,4)',\n [DataColumnType.BOOLEAN]: 'BOOLEAN',\n [DataColumnType.DATE]: 'DATE',\n [DataColumnType.TIMESTAMP]: 'TIMESTAMP',\n [DataColumnType.JSON]: 'JSON',\n};\n// ============================================================================\n// Data Store Types\n// ============================================================================\n/**\n * Data store lifecycle status.\n */\nexport const DataStoreStatus = {\n CREATING: 'creating',\n ACTIVE: 'active',\n ERROR: 'error',\n ARCHIVED: 'archived',\n};\n// ============================================================================\n// Import Types\n// ============================================================================\n/**\n * Import job status.\n */\nexport const ImportStatus = {\n PENDING: 'pending',\n PROCESSING: 'processing',\n COMPLETED: 'completed',\n FAILED: 'failed',\n ROLLED_BACK: 'rolled_back',\n};\n/**\n * Default retention configuration: 30 days, snapshots exempt.\n */\nexport const DEFAULT_RETENTION_CONFIG = {\n retention_days: 30,\n snapshots_exempt: true,\n};\n// ============================================================================\n// Dashboard Types\n// ============================================================================\n/**\n * Dashboard lifecycle status.\n */\nexport const DashboardStatus = {\n /** Dashboard is active and usable */\n ACTIVE: 'active',\n /** Dashboard has been archived (soft deleted) */\n ARCHIVED: 'archived',\n};\n/**\n * Default layout configuration for dashboards.\n *\n * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.\n */\nexport const DEFAULT_DASHBOARD_LAYOUT = {\n columns: 2,\n cellWidth: 600,\n cellHeight: 400,\n padding: 20,\n};\n//# sourceMappingURL=data-platform.js.map","/**\n * Type guard for email channels\n */\nexport function isEmailChannel(channel) {\n return channel.type === 'email';\n}\n/**\n * Type guard for interactive channels\n */\nexport function isInteractiveChannel(channel) {\n return channel.type === 'interactive';\n}\n//# sourceMappingURL=email.js.map","// Explicit model exceptions\nconst RECORD_MODEL_CAPABILITIES = {\n // claude-3-5-haiku: no image input\n 'claude-3-5-haiku-20241022': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Family-level capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n 'claude-3-5-haiku': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-haiku': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-sonnet': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-opus': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-7': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\nconst DEFAULT_CLAUDE_CAPABILITIES = {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n};\nexport function getModelCapabilitiesAnthropic(model) {\n const lower = model.toLowerCase();\n // Exact match first\n if (lower in RECORD_MODEL_CAPABILITIES) {\n return RECORD_MODEL_CAPABILITIES[lower];\n }\n // Longest prefix family match\n let bestKey;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (lower.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n if (bestKey) {\n return RECORD_FAMILY_CAPABILITIES[bestKey];\n }\n return DEFAULT_CLAUDE_CAPABILITIES;\n}\n//# sourceMappingURL=anthropic.js.map","/**\n * Version parsing utilities for Claude, OpenAI, and Gemini models.\n *\n * Provides version detection helpers that are forward-compatible with future\n * model releases (e.g., Fable 5, Mythos 5, GPT-5.6, and Gemini 3.5).\n *\n * These helpers are used to:\n * - Control option visibility in the UI\n * - Construct appropriate API payloads for each model version\n *\n * Note: llumiverse does NOT validate options here. Errors from invalid\n * parameters propagate to the provider side.\n */\n// ============================================================================\n// Generic Model-Family Version Parsing\n// ============================================================================\n/**\n * Check a numeric model-family suffix using major/minor ordering.\n *\n * The family includes the stable part immediately before the version, for\n * example `openai.gpt-`, `xai.grok-`, or `deepseek.v`. This deliberately\n * accepts later versions so new models inherit the newest known behavior.\n */\nexport function isModelFamilyVersionGTE(modelString, family, targetMajor, targetMinor) {\n const normalized = modelString.toLowerCase();\n const familyIndex = normalized.indexOf(family.toLowerCase());\n if (familyIndex === -1)\n return false;\n const version = normalized.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!version)\n return false;\n const major = Number(version[1]);\n const minor = Number(version[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nfunction isClaudeVariant(value) {\n return value === 'opus' || value === 'sonnet' || value === 'haiku' || value === 'fable' || value === 'mythos';\n}\n/**\n * Parse Claude model version from a model string.\n *\n * Examples:\n * - \"claude-opus-4-7\" -> { major: 4, minor: 7, variant: 'opus' }\n * - \"claude-sonnet-4-6\" -> { major: 4, minor: 6, variant: 'sonnet' }\n * - \"claude-3-7-sonnet-20250219\" -> { major: 3, minor: 7, variant: 'sonnet' }\n * - \"claude-opus-4-6\" -> { major: 4, minor: 6, variant: 'opus' }\n *\n * @param modelString - The model identifier string\n * @returns Parsed version info, or null if not parseable\n */\nexport function parseClaudeVersion(modelString) {\n if (/claude-mythos-preview(?:-|\\b)/i.test(modelString)) {\n return { major: 5, minor: 0, variant: 'mythos' };\n }\n // Match pattern: claude-[variant-]-{major}-[optional minor]\n // The minor version is limited to 1-2 digits to avoid matching dates (YYYYMMDD format)\n const match = modelString.match(/claude-(opus|sonnet|haiku|fable|mythos)-?(\\d+)(?:-(\\d{1,2}))?(?:-|\\b)/i);\n if (match) {\n const variant = match[1].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n const major = parseInt(match[2], 10);\n const minor = match[3] ? parseInt(match[3], 10) : 0;\n return { major, minor, variant };\n }\n // Fallback for older format: claude-3-7-sonnet-20250219\n const fallbackMatch = modelString.match(/claude-(\\d+)-(\\d+)-(opus|sonnet|haiku|fable|mythos)(?:-|\\b)/i);\n if (fallbackMatch) {\n const major = parseInt(fallbackMatch[1], 10);\n const minor = parseInt(fallbackMatch[2], 10);\n const variant = fallbackMatch[3].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n return { major, minor, variant };\n }\n return null;\n}\n/**\n * Check if a Claude model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model version is >= target version, false otherwise\n */\nexport function isClaudeVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n if (version.major > targetMajor) {\n return true;\n }\n if (version.major === targetMajor && version.minor >= targetMinor) {\n return true;\n }\n return false;\n}\n/**\n * Check if a Claude variant model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param variant - Model family: \"opus\" or \"sonnet\"\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model matches the variant and version >= target\n */\nfunction isClaudeVariantVersionGTE(modelString, variant, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version)\n return false;\n if (version.variant.toLowerCase() !== variant)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\n/**\n * Check if a model requires sampling parameter removal (behavior: sampling params removed on Opus 4.7+).\n *\n * This includes:\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 7\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.7+ or equivalent future model\n */\nexport function hasSamplingParameterRemoval(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 7);\n}\n/**\n * Check if a model requires adaptive thinking (behavior: adaptive thinking required on Opus 4.6+).\n *\n * This includes:\n * - claude-opus-4-6\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 6\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.6+ or equivalent future model\n */\nexport function requiresAdaptiveThinking(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 6);\n}\n/**\n * Check if a model supports adaptive thinking.\n *\n * Adaptive thinking was introduced in:\n * - Claude Opus 4.6\n * - Claude Sonnet 4.6\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports adaptive thinking\n */\nexport function supportsAdaptiveThinking(modelString) {\n return (isClaudeVersionGTE(modelString, 5, 0) ||\n requiresAdaptiveThinking(modelString) ||\n isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6));\n}\n/**\n * Check if extended thinking is deprecated for this model.\n *\n * Extended thinking (thinking.type: \"enabled\" with budget_tokens) is deprecated\n * but still functional on:\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is deprecated (adaptive thinking recommended)\n */\nexport function isExtendedThinkingDeprecated(modelString) {\n return supportsAdaptiveThinking(modelString);\n}\n/**\n * Check if a model requires adaptive thinking ONLY (extended thinking removed).\n *\n * On Opus 4.7+, extended thinking returns a 400 error. Only adaptive thinking is supported.\n * Future models (Sonnet 4.7+, Haiku 4.7+, any 5.0+) follow the same pattern.\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is removed (returns 400 error)\n */\nexport function requiresAdaptiveThinkingOnly(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/**\n * Check if a model has sampling parameter restrictions.\n *\n * On Opus 4.7+, setting temperature, top_p, or top_k to any non-default value\n * returns a 400 error. Future models following the same pattern will also match:\n * - Opus 4.7+ (current restriction)\n * - Sonnet 4.7+, Haiku 4.7+ (future minor versions >= 7)\n * - Sonnet 5.0+, Haiku 5.0+, Opus 5.0+ (future major versions)\n *\n * @param modelString - The model identifier string\n * @returns true if sampling parameters are restricted\n */\nexport function hasSamplingParameterRestriction(modelString) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n // Future major versions (5.0+) follow the same pattern as 4.7\n if (version.major > 4) {\n return true;\n }\n // Version 4.7+ (Opus 4.7, Sonnet 4.7, Haiku 4.7, etc.)\n if (version.major === 4 && version.minor >= 7) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the effort parameter.\n *\n * Effort is supported on:\n * - Claude Opus 4.5+\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n * - All variants at 4.7+ (Opus, Sonnet, Haiku)\n * - All variants at 5.0+\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports the effort parameter\n */\nexport function supportsEffort(modelString) {\n // All 4.7+ variants support effort (covers future Sonnet 4.7, Haiku 4.7, etc.)\n if (hasSamplingParameterRestriction(modelString)) {\n return true;\n }\n // Opus 4.5+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'opus', 4, 5)) {\n return true;\n }\n // Sonnet 4.6+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6)) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the xhigh effort level.\n *\n * xhigh is available on the sampling-restricted Claude generation and Mythos Preview.\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports xhigh effort\n */\nexport function supportsXHighEffort(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/** Parse GPT family versions from bare IDs, snapshots, or provider-qualified paths. */\nexport function parseOpenAIGptVersion(modelString) {\n const match = modelString.toLowerCase().match(/(?:^|[./:])(?:openai\\.)?gpt-(\\d+)(?:\\.(\\d+))?(?:-|[.:@]|$)/);\n if (!match)\n return null;\n return { major: Number(match[1]), minor: Number(match[2] ?? '0') };\n}\nexport function isOpenAIGptVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseOpenAIGptVersion(modelString);\n if (!version)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\nexport function isOpenAIGptProModel(modelString) {\n return /(?:^|[./:])(?:openai\\.)?gpt-\\d+(?:\\.\\d+)?-pro(?:-|[.:@]|$)/i.test(modelString);\n}\n/** Current reasoning-effort metadata, expressed with version thresholds for future GPT releases. */\nexport function getOpenAIReasoningEffortLevels(modelString) {\n if (!isOpenAIGptVersionGTE(modelString, 5, 0))\n return null;\n if (isOpenAIGptProModel(modelString)) {\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { Medium: 'medium', 'High (default)': 'high', 'Extra High': 'xhigh' };\n }\n return { 'High (only)': 'high' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 6)) {\n return {\n None: 'none',\n Low: 'low',\n Medium: 'medium',\n High: 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high', 'Extra High': 'xhigh' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 1)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\n/**\n * Get the available effort levels for a given Claude model.\n *\n * - Opus 4.7+: low, medium, high, xhigh, max\n * - Opus 4.5+, Opus 4.6+, Sonnet 4.6+: low, medium, high, max\n * - Other models: empty (effort not supported)\n *\n * @param modelString - The model identifier string\n * @returns Record of display label to effort level value, or null if not supported\n */\nexport function getAvailableEffortLevels(modelString) {\n if (!supportsEffort(modelString)) {\n return null;\n }\n const levels = {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n Max: 'max',\n };\n if (supportsXHighEffort(modelString)) {\n // Insert xhigh between high and max\n return {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n return levels;\n}\n// ============================================================================\n// Gemini Version Parsing\n// ============================================================================\n/**\n * Extract Gemini version from a model ID.\n *\n * Examples:\n * - \"locations/global/publishers/google/models/gemini-2.5-flash\" -> \"2.5\"\n * - \"publishers/google/models/gemini-3-pro-image-preview\" -> \"3\"\n * - \"gemini-3.1-flash-lite-preview\" -> \"3.1\"\n *\n * @param modelId - The model identifier string\n * @returns Version string (e.g., \"2.5\", \"3\", \"3.1\"), or undefined if not parseable\n */\nexport function getGeminiModelVersion(modelId) {\n const modelName = modelId.split('/').pop() ?? modelId;\n const match = modelName.match(/^gemini-(\\d+(?:\\.\\d+)?)/i);\n return match?.[1];\n}\n/**\n * Parse a version string into major.minor components.\n *\n * @param version - Version string (e.g., \"2.5\", \"3\", \"3.1\")\n * @returns Parsed version, or undefined if not parseable\n */\nexport function parseGeminiVersion(version) {\n const match = version.match(/^(\\d+)(?:\\.(\\d+))?$/);\n if (!match) {\n return undefined;\n }\n return {\n major: Number(match[1]),\n minor: Number(match[2] ?? '0'),\n };\n}\n/**\n * Check if a Gemini model version is greater than or equal to a minimum version.\n *\n * @param modelId - The model identifier string\n * @param minVersion - Minimum version string (e.g., \"2.5\", \"3.0\")\n * @returns true if model version >= min version\n */\nexport function isGeminiModelVersionGte(modelId, minVersion) {\n const modelVersion = getGeminiModelVersion(modelId);\n if (!modelVersion) {\n return false;\n }\n const current = parseGeminiVersion(modelVersion);\n const target = parseGeminiVersion(minVersion);\n if (!current || !target) {\n return false;\n }\n if (current.major > target.major) {\n return true;\n }\n if (current.major < target.major) {\n return false;\n }\n return current.minor >= target.minor;\n}\n//# sourceMappingURL=version-parsing.js.map","import { isModelFamilyVersionGTE } from '../options/version-parsing.js';\n// Global feature flags - temporarily disable tool support for non-OpenAI models\nconst ENABLE_TOOL_SUPPORT_NON_OPENAI = false;\n// Record of Azure Foundry model capabilities keyed by model ID (lowercased)\n// Only include models with specific exceptions that differ from their family patterns\nconst RECORD_MODEL_CAPABILITIES = {\n // OpenAI O-series exceptions - o1-mini doesn't have tool support like other o1 models\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // OpenAI o3 is text-only unlike other o-series models\n o3: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Models with special properties not covered by family patterns\n 'deepseek-r1-0528': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3-0324': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-medium-2505': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-nemo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-4-scout-17b-16e-instruct': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n // OpenAI GPT families\n 'gpt-3.5-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // OpenAI O-series families\n o1: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-preview': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-pro': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o3-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o4-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o4: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Llama families\n 'llama-3.1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-3.3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Mistral families\n 'mistral-large': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'mistral-small': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n mistral: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Microsoft Phi families\n 'phi-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n phi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // DeepSeek families\n 'deepseek-r1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // AI21 families\n 'ai21-jamba': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n ai21: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n jamba: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // Cohere families\n 'cohere-command': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n cohere: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n command: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // xAI families\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n grok: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image', 'vision'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'gpt-4',\n 'gpt-4o',\n 'o1',\n 'o3',\n 'o4',\n 'llama-3',\n 'mistral-large',\n 'mistral-small',\n 'jamba',\n 'cohere',\n 'command',\n 'grok',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for an Azure Foundry model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to family pattern matching.\n */\nexport function getModelCapabilitiesAzureFoundry(model) {\n // Extract base model from composite ID (deployment::baseModel)\n const { baseModel } = parseAzureFoundryModelId(model);\n const normalized = baseModel.toLowerCase();\n // 1. Exact match in record\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n return applyGlobalToolSupportDisable(record, normalized);\n }\n if (isModelFamilyVersionGTE(normalized, 'llama-', 4, 0) || isModelFamilyVersionGTE(normalized, 'llama', 4, 0)) {\n // Future Llama deployments inherit the latest known Foundry family behavior.\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES['llama-4'], normalized);\n }\n // 2. Fallback: find the longest matching family prefix in RECORD_FAMILY_CAPABILITIES\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES[bestFamilyKey], normalized);\n }\n // 3. Fallback: infer from normalized name using patterns\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || true, // Default to text input\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || true, // Default to text output\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n const tool_support_streaming = tool_support || undefined;\n const inferredCapabilities = { input, output, tool_support, tool_support_streaming };\n return applyGlobalToolSupportDisable(inferredCapabilities, normalized);\n}\n/**\n * Apply global tool support disable for non-OpenAI models.\n * Preserves model-specific information for future use while temporarily disabling tool support.\n */\nfunction applyGlobalToolSupportDisable(capabilities, modelName) {\n // Check if this is an OpenAI model\n const isOpenAIModel = modelName.startsWith('gpt-') ||\n modelName.startsWith('o1') ||\n modelName.startsWith('o3') ||\n modelName.startsWith('o4');\n if (!ENABLE_TOOL_SUPPORT_NON_OPENAI && !isOpenAIModel) {\n // Disable tool support for non-OpenAI models while preserving other capabilities\n return {\n ...capabilities,\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n return capabilities;\n}\n// Helper function to parse composite model IDs\nfunction parseAzureFoundryModelId(compositeId) {\n const parts = compositeId.split('::');\n if (parts.length === 2) {\n return {\n deploymentName: parts[0],\n baseModel: parts[1],\n };\n }\n // Backwards compatibility: if no delimiter found, treat as deployment name\n return {\n deploymentName: compositeId,\n baseModel: compositeId,\n };\n}\n//# sourceMappingURL=azure_foundry.js.map","import { parseClaudeVersion } from '../options/version-parsing.js';\nfunction includesAny(model, patterns) {\n return patterns.some((pattern) => model.includes(pattern));\n}\nfunction isFamilyVersionGte(model, family, targetMajor, targetMinor = 0) {\n const familyIndex = model.indexOf(family);\n if (familyIndex === -1)\n return false;\n const match = model.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\n/**\n * Geographic prefix carried by cross-region inference IDs (`us.`, `eu.`, `apac.`, `us-gov.`, `global.`).\n * No publisher segment collides with these, so the prefix can be stripped wherever it appears — not\n * only inside an inference-profile ARN, since callers also pass the bare `us.<publisher>.<model>` ID.\n */\nconst GEO_PREFIX = /^(?:[a-z]{2}(?:-gov)?|apac|global)\\./;\nexport function normalizeBedrockModelId(model) {\n const normalized = model.toLowerCase();\n const slash = normalized.lastIndexOf('/');\n const modelId = slash === -1 ? normalized : normalized.slice(slash + 1);\n return modelId.replace(GEO_PREFIX, '');\n}\nfunction getModalities(model) {\n if (includesAny(model, ['nova-2-multimodal-embeddings', 'titan-embed', 'cohere.embed', 'marengo-embed'])) {\n return {\n input: {\n text: true,\n image: includesAny(model, ['multimodal', 'embed-image', 'embed-v4', 'marengo']),\n video: includesAny(model, ['multimodal', 'marengo']),\n audio: model.includes('multimodal'),\n embed: false,\n },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n };\n }\n if (includesAny(model, ['nova-canvas', 'titan-image-generator'])) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n };\n }\n if (model.includes('nova-reel')) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: false, embed: false },\n };\n }\n const image = (model.includes('anthropic.claude') && !model.includes('claude-3-5-haiku')) ||\n (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('google.gemma') ||\n includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b']) ||\n isFamilyVersionGte(model, 'meta.llama', 4) ||\n includesAny(model, [\n 'mistral.magistral-',\n 'mistral.ministral-3-',\n 'mistral.mistral-large-3-',\n 'mistral.pixtral-',\n ]) ||\n isFamilyVersionGte(model, 'kimi-k', 2, 5) ||\n model.includes('nemotron-nano-12b') ||\n model.includes('qwen3-vl') ||\n model.includes('palmyra-vision') ||\n (model.startsWith('openai.gpt-') && !model.includes('gpt-oss')) ||\n model.startsWith('xai.grok-');\n const video = (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('twelvelabs.pegasus') ||\n isFamilyVersionGte(model, 'google.gemma-', 4);\n const audio = includesAny(model, ['nova-sonic', 'mistral.voxtral-']) || model.includes('google.gemma-4-e2b');\n return {\n input: { text: !model.includes('nova-sonic-v1'), image, video, audio, embed: false },\n output: { text: true, image: false, video: false, audio: model.includes('nova-sonic'), embed: false },\n };\n}\nfunction getLimits(model) {\n if (model.includes('ai21.jamba'))\n return { context_window: 256_000, max_output_tokens: 4_096 };\n if (model.includes('amazon.nova-2'))\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n if (model.includes('amazon.nova-premier'))\n return { context_window: 1_000_000, max_output_tokens: 25_600 };\n if (model.includes('amazon.nova-micro'))\n return { context_window: 128_000, max_output_tokens: 5_120 };\n if (includesAny(model, ['amazon.nova-lite', 'amazon.nova-pro'])) {\n return { context_window: 300_000, max_output_tokens: 5_120 };\n }\n if (model.includes('anthropic.claude')) {\n // Version rules rather than an ID list, so a newly released variant inherits the limits of the\n // newest understood generation instead of silently reporting no limits at all.\n const claude = parseClaudeVersion(model);\n if (claude) {\n const atLeast = (major, minor) => claude.major > major || (claude.major === major && claude.minor >= minor);\n if (atLeast(4, 7) || (claude.variant === 'opus' && atLeast(4, 6))) {\n // Bedrock enforces an EXCLUSIVE 128K bound for this family: it rejects\n // max_tokens >= 128000 with \"Try again with a maximum tokens value that\n // is lower than 128000\" (same exclusive-bound quirk as Haiku 4.5 below).\n return { context_window: 1_000_000, max_output_tokens: 127_999 };\n }\n if (claude.variant === 'sonnet' && atLeast(4, 6)) {\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n }\n if (atLeast(4, 5)) {\n // Bedrock documents 64K for Haiku 4.5 but rejects max_tokens=64000; its bound is exclusive.\n return {\n context_window: 200_000,\n max_output_tokens: claude.variant === 'haiku' ? 63_999 : 65_536,\n };\n }\n if (atLeast(4, 0)) {\n return {\n context_window: 200_000,\n max_output_tokens: claude.variant === 'opus' ? 32_000 : 65_536,\n };\n }\n }\n if (model.includes('claude-3-5-haiku'))\n return { context_window: 200_000, max_output_tokens: 8_192 };\n if (model.includes('claude-3-haiku'))\n return { context_window: 200_000, max_output_tokens: 4_096 };\n }\n if (model.includes('cohere.command-r'))\n return { context_window: 128_000, max_output_tokens: 4_096 };\n if (isFamilyVersionGte(model, 'deepseek.v', 3, 2)) {\n return { context_window: 163_840, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['deepseek.v3', 'deepseek.r1']))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('google.gemma-4-31b') || model.includes('google.gemma-4-26b')) {\n return { context_window: 256_000 };\n }\n if (model.includes('google.gemma-4-e2b'))\n return { context_window: 128_000 };\n if (model.includes('google.gemma-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (isFamilyVersionGte(model, 'meta.llama', 4)) {\n // Future Llama releases inherit the latest provider limit family while retaining the documented Scout split.\n return { context_window: model.includes('scout') ? 10_000_000 : 1_000_000, max_output_tokens: 8_192 };\n }\n if (model.includes('meta.llama3-') &&\n !model.includes('llama3-1') &&\n !model.includes('llama3-2') &&\n !model.includes('llama3-3')) {\n return { context_window: 8_192, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['meta.llama3-1', 'meta.llama3-2', 'meta.llama3-3'])) {\n return { context_window: 128_000, max_output_tokens: 4_096 };\n }\n if (isFamilyVersionGte(model, 'minimax.minimax-m', 2, 1)) {\n return { context_window: 196_000, max_output_tokens: 8_192 };\n }\n if (model.includes('minimax.minimax-m2'))\n return { context_window: 1_000_000, max_output_tokens: 8_192 };\n if (includesAny(model, ['mistral.devstral-2', 'mistral.mistral-large-3'])) {\n return { context_window: 256_000, max_output_tokens: 32_768 };\n }\n if (model.includes('mistral.magistral-'))\n return { context_window: 128_000, max_output_tokens: 40_960 };\n if (model.includes('mistral.ministral-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('mistral.pixtral-'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (includesAny(model, [\n 'mistral.mistral-7b',\n 'mistral.mistral-large-2402',\n 'mistral.mistral-small-2402',\n 'mistral.mixtral-',\n 'mistral.voxtral-',\n ])) {\n return { context_window: 32_000, max_output_tokens: model.includes('voxtral') ? undefined : 4_096 };\n }\n if (includesAny(model, ['moonshot.kimi-k2', 'moonshotai.kimi-k2'])) {\n return { context_window: 256_000, max_output_tokens: 16_384 };\n }\n if (model.includes('nvidia.nemotron-super-'))\n return { context_window: 256_000, max_output_tokens: 32_768 };\n const nemotronNanoGeneration = model.match(/nvidia\\.nemotron-nano-(\\d+)-/)?.[1];\n if (nemotronNanoGeneration && Number(nemotronNanoGeneration) >= 3) {\n return { context_window: 256_000, max_output_tokens: 8_192 };\n }\n if (model.includes('nvidia.nemotron-nano-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (isFamilyVersionGte(model, 'openai.gpt-', 5) && !model.includes('gpt-oss')) {\n return { context_window: 272_000, max_output_tokens: 128_000 };\n }\n if (model.includes('openai.gpt-oss'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-235b'))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-32b'))\n return { context_window: 32_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-coder-30b'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-480b'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-next'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (includesAny(model, ['qwen3-next-', 'qwen3-vl-']))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('writer.palmyra-vision'))\n return { context_window: 4_096, max_output_tokens: 4_096 };\n if (includesAny(model, ['writer.palmyra-x4', 'writer.palmyra-x5'])) {\n return { context_window: 128_000, max_output_tokens: 8_192 };\n }\n if (model.startsWith('xai.grok-'))\n return { context_window: 1_000_000 };\n if (includesAny(model, ['zai.glm-4.7', 'zai.glm-4.6']))\n return { context_window: 203_000, max_output_tokens: 4_096 };\n if (model.includes('zai.glm-5'))\n return { context_window: 200_000, max_output_tokens: 131_072 };\n return {};\n}\nfunction getRuntimeToolSupport(model) {\n let toolSupport;\n let streaming = false;\n if (model.includes('gpt-oss-safeguard') || model.includes('deepseek.r1')) {\n toolSupport = false;\n }\n else if (model.includes('anthropic.claude')) {\n toolSupport = true;\n streaming = !model.includes('claude-3-5-haiku');\n }\n else if (model.includes('ai21.jamba') && !model.includes('jamba-instruct')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('amazon.nova') && !includesAny(model, ['nova-canvas', 'nova-reel'])) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('cohere.command-r')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('meta.llama3-1')) {\n toolSupport = true;\n streaming = false;\n }\n else if (includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b'])) {\n toolSupport = true;\n }\n else if (isFamilyVersionGte(model, 'meta.llama', 4)) {\n // Bedrock's Converse behavior is family-stable here; future Llama generations inherit Llama 4 tool support.\n toolSupport = true;\n streaming = false;\n }\n else if (includesAny(model, ['qwen.qwen3-235b', 'qwen.qwen3-32b'])) {\n toolSupport = true;\n streaming = false;\n }\n else if (model.startsWith('deepseek.') && !model.includes('deepseek.r1')) {\n toolSupport = true;\n streaming = false;\n }\n else if (model.startsWith('openai.gpt-') || model.startsWith('xai.grok-')) {\n toolSupport = true;\n streaming = true;\n }\n else if (isFamilyVersionGte(model, 'google.gemma-', 4)) {\n // Later Gemma generations inherit the newest verified Bedrock tool behavior.\n toolSupport = true;\n streaming = true;\n }\n else if (includesAny(model, ['mistral.mistral-large', 'mistral.pixtral'])) {\n toolSupport = true;\n }\n else if (model.includes('twelvelabs.pegasus')) {\n toolSupport = true;\n }\n else if (model.includes('writer.palmyra')) {\n toolSupport = true;\n }\n if (toolSupport === undefined)\n return {};\n return { tool_support: toolSupport, tool_support_streaming: toolSupport && streaming };\n}\nexport function getBedrockModelKnowledge(model) {\n const modelId = normalizeBedrockModelId(model);\n return { ...getModalities(modelId), ...getLimits(modelId) };\n}\nexport function getBedrockModelCapabilities(model, endpoint) {\n const modelId = normalizeBedrockModelId(model);\n const knowledge = getBedrockModelKnowledge(modelId);\n // AWS documents client-side tool calling for Nemotron on Mantle, but not Bedrock Runtime tool use.\n const sourceToolSupport = endpoint === 'mantle' && modelId.startsWith('nvidia.nemotron-')\n ? { tool_support: true }\n : getRuntimeToolSupport(modelId);\n // Mantle can stream tool calls, but its protocol alone does not give every hosted source model tool support.\n // Preserve false/unknown source semantics and relax only a known-positive runtime streaming restriction.\n const toolSupport = endpoint === 'mantle' && sourceToolSupport.tool_support === true\n ? { ...sourceToolSupport, tool_support_streaming: true }\n : sourceToolSupport;\n return {\n input: knowledge.input,\n output: knowledge.output,\n ...toolSupport,\n };\n}\n//# sourceMappingURL=bedrock-models.js.map","function datedVersionGte(model, family, target) {\n const match = model.match(new RegExp(`${family}(\\\\d{4})(?:[-_.]|$)`));\n return !!match && Number(match[1]) >= target;\n}\nfunction semanticVersionGte(model, family, targetMajor, targetMinor = 0) {\n const match = model.match(new RegExp(`${family}(\\\\d+)(?:[-.](\\\\d+))?(?:[-_.]|$)`));\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nfunction isMistralSmall4OrLater(model) {\n return (model.includes('mistral-small-latest') ||\n datedVersionGte(model, 'mistral-small-', 2603) ||\n semanticVersionGte(model, 'mistral-small-', 4));\n}\nfunction isMistralMedium35OrLater(model) {\n return (model.includes('mistral-medium-latest') ||\n datedVersionGte(model, 'mistral-medium-', 2604) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 5));\n}\nexport function isMistralAdjustableReasoningModel(model) {\n const normalized = model.toLowerCase();\n return isMistralSmall4OrLater(normalized) || isMistralMedium35OrLater(normalized);\n}\nfunction hasMistralVision(model) {\n return (model.includes('pixtral') ||\n model.includes('mistral-small-latest') ||\n datedVersionGte(model, 'mistral-small-', 2503) ||\n semanticVersionGte(model, 'mistral-small-', 3, 1) ||\n model.includes('mistral-medium-latest') ||\n datedVersionGte(model, 'mistral-medium-', 2508) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 1) ||\n model.includes('mistral-large-latest') ||\n datedVersionGte(model, 'mistral-large-', 2512) ||\n semanticVersionGte(model, 'mistral-large-', 3) ||\n /ministral-(?:3|8|14)b-(?:latest|\\d{4})(?:[-_.]|$)/.test(model));\n}\nfunction getMistralContextWindow(model) {\n if (model.includes('voxtral-small') || model.includes('voxtral-mini'))\n return 32_000;\n if (model.includes('magistral-')) {\n const version = model.match(/magistral-(?:small|medium)-(\\d{4})(?:[-_.]|$)/)?.[1];\n return model.includes('latest') || (version && Number(version) >= 2509) ? 128_000 : 40_000;\n }\n if (isMistralSmall4OrLater(model) ||\n isMistralMedium35OrLater(model) ||\n model.includes('mistral-large-latest') ||\n datedVersionGte(model, 'mistral-large-', 2512) ||\n semanticVersionGte(model, 'mistral-large-', 3) ||\n /ministral-(?:3|8|14)b-(?:latest|\\d{4})(?:[-_.]|$)/.test(model) ||\n model.includes('devstral-2') ||\n model.includes('leanstral')) {\n return 256_000;\n }\n if (datedVersionGte(model, 'mistral-small-', 2503) ||\n semanticVersionGte(model, 'mistral-small-', 3, 1) ||\n datedVersionGte(model, 'mistral-medium-', 2508) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 1) ||\n model.includes('mistral-nemo') ||\n model.includes('open-mistral-nemo') ||\n model.includes('codestral') ||\n model.includes('pixtral')) {\n return 128_000;\n }\n if (/mistral-(?:small|medium|large)-24\\d{2}/.test(model) || model.includes('open-mistral-7b')) {\n return 32_000;\n }\n return undefined;\n}\nexport function getMistralModelKnowledge(model) {\n const normalized = model.toLowerCase();\n if (normalized.includes('moderation') || normalized.includes('shieldstral')) {\n return {\n capabilities: {\n input: { text: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('mistral-ocr')) {\n return {\n capabilities: {\n input: { text: true, image: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('tts')) {\n return {\n capabilities: {\n input: { text: true },\n output: { audio: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('voxtral-mini') && /(transcribe|realtime)/.test(normalized)) {\n return {\n capabilities: {\n input: { audio: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n const adjustableReasoning = isMistralAdjustableReasoningModel(normalized);\n const voxtralMini = normalized.includes('voxtral-mini');\n return {\n capabilities: {\n input: {\n text: true,\n image: hasMistralVision(normalized) || undefined,\n audio: normalized.includes('voxtral-small') || voxtralMini || undefined,\n },\n output: { text: true },\n tool_support: !voxtralMini,\n tool_support_streaming: !voxtralMini,\n },\n context_window: getMistralContextWindow(normalized),\n ...(adjustableReasoning && { reasoning_effort_levels: ['none', 'high'] }),\n };\n}\n//# sourceMappingURL=mistral.js.map","// Record of OpenAI model capabilities keyed by model ID (lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'chatgpt-4o-latest': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\n// For OpenAI, tool_support_streaming matches tool_support since the API supports tools while streaming\nconst RECORD_FAMILY_CAPABILITIES = {\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-3.5': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4-turbo': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'chatgpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'dall-e': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'o1-preview': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'omni-moderation': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n sora: {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: true, embed: false },\n tool_support: false,\n },\n 'text-embedding': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n tool_support: false,\n },\n 'text-moderation': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n whisper: {\n input: { text: false, image: false, video: false, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = ['tool', 'gpt', 'gpt-5', 'o1', 'o3', 'o4'];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeOpenAIModelName(modelName) {\n return modelName.toLowerCase();\n}\n/**\n * Get the full ModelCapabilities for an OpenAI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n * For OpenAI models, tool_support_streaming defaults to tool_support since the API supports tools while streaming.\n */\nexport function getModelCapabilitiesOpenAI(model) {\n const normalized = normalizeOpenAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...record,\n tool_support_streaming: record.tool_support_streaming ?? record.tool_support,\n };\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n const family = RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...family,\n tool_support_streaming: family.tool_support_streaming ?? family.tool_support,\n };\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n // Default tool_support_streaming to tool_support for OpenAI models\n return { input, output, tool_support, tool_support_streaming: tool_support };\n}\n//# sourceMappingURL=openai.js.map","import { isModelFamilyVersionGTE } from '../options/version-parsing.js';\n// Record of Vertex AI model capabilities keyed by model ID (last path segment, lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'gemini-2.0-flash-lite-001': {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemma-4-26b-a4b-it-maas': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Default family capabilities intentionally describe the latest known behavior for a model family.\n// Newer Vertex models should inherit these defaults by prefix until proven otherwise; add model-specific\n// records above only for older variants or materially different models that do not match the family default.\nconst RECORD_FAMILY_CAPABILITIES = {\n gemini: {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gemini-3.1-flash-image': {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-2.5-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-pro-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n imagen: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n claude: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-2': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n grok: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n gemma: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n glm: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n kimi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n minimax: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n qwen: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'sonnet',\n 'opus',\n 'gemini',\n 'claude',\n 'grok',\n 'deepseek',\n 'gemma',\n 'glm',\n 'gpt-oss',\n 'kimi',\n 'llama',\n 'minimax',\n 'qwen',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeVertexAIModelName(modelName) {\n const segments = modelName.toLowerCase().split('/');\n return segments[segments.length - 1];\n}\n/**\n * Get the full ModelCapabilities for a Vertex AI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesVertexAI(model) {\n const normalized = normalizeVertexAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record)\n return record;\n if (isModelFamilyVersionGTE(normalized, 'llama-', 4, 0) || isModelFamilyVersionGTE(normalized, 'llama', 4, 0)) {\n // New Llama generations inherit the latest known MaaS family capabilities until a model-specific exception\n // is documented above.\n return RECORD_FAMILY_CAPABILITIES['llama-4'];\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=vertexai.js.map","import { getMistralModelKnowledge } from '../capability/mistral.js';\nimport { isClaudeVersionGTE, isModelFamilyVersionGTE, isOpenAIGptProModel, isOpenAIGptVersionGTE, parseOpenAIGptVersion, } from './version-parsing.js';\nfunction isDeepSeekV32OrLater(model) {\n return isModelFamilyVersionGTE(model, 'deepseek.v', 3, 2) || isModelFamilyVersionGTE(model, 'deepseek-v', 3, 2);\n}\n/**\n * Returns the max output tokens for a given model (provider-agnostic).\n * When a model's limits vary by provider, returns a conservative value\n * that works across all providers.\n */\nexport function getMaxOutputTokens(model) {\n model = model.toLowerCase();\n // Claude models\n if (model.includes('claude')) {\n if (isClaudeVersionGTE(model, 4, 7))\n return 128_000;\n if (model.includes('opus-4-6'))\n return 128_000;\n if (model.includes('opus-4-5'))\n return 64_000;\n if (model.includes('opus-'))\n return 32_000; // Opus 4.0, 4.1\n if (model.includes('-4-'))\n return 64_000; // Sonnet 4.x, Haiku 4.5\n if (model.includes('-3-7'))\n return 64_000; // 128K with beta header, default 64K\n if (model.includes('-3-5'))\n return 8_192;\n return 4_096; // Claude 3 older\n }\n // Gemini models\n if (model.includes('gemini')) {\n if (model.includes('-1.0-'))\n return 2_048;\n if (model.includes('flash-image') || model.includes('pro-image'))\n return 32_768;\n return 65_535; // Gemini 1.5, 2.0, 2.5, 3 — API upper bound is exclusive\n }\n // OpenAI o-series\n if (model.includes('o1-mini'))\n return 65_536;\n if (model.includes('o1'))\n return 100_000;\n if (/(?:^|[~/.])o\\d+(?:[-_.]|$)/.test(model.toLowerCase()))\n return 100_000;\n // GPT models\n const gptVersion = parseOpenAIGptVersion(model);\n if (model.includes('gpt-5-chat-latest'))\n return 16_384;\n if (isOpenAIGptProModel(model) && gptVersion?.major === 5 && gptVersion.minor === 0)\n return 272_000;\n if (isOpenAIGptVersionGTE(model, 5, 0))\n return 128_000;\n if (model.includes('gpt-oss'))\n return 16_384;\n if (model.includes('gpt-4o'))\n return 16_384;\n if (model.includes('gpt-4'))\n return 8_192;\n if (model.includes('gpt-3.5'))\n return 4_096;\n // Grok\n if (isModelFamilyVersionGTE(model, 'grok-', 4, 3))\n return 131_072;\n // Amazon Nova\n if (model.includes('nova'))\n return 10_000;\n // Mistral\n if (model.includes('mistral'))\n return 8_192;\n // DeepSeek\n if (model.includes('deepseek-r1-0528'))\n return 32_768;\n if (isDeepSeekV32OrLater(model))\n return 65_536;\n if (model.includes('deepseek'))\n return 128_000;\n // Qwen\n if (model.includes('qwen3-next'))\n return 262_144;\n if (model.includes('qwen3-coder'))\n return 65_536;\n if (model.includes('qwen'))\n return 32_768;\n // Kimi\n if (model.includes('kimi-k2-thinking'))\n return 262_144;\n // MiniMax\n if (model.includes('minimax-m2'))\n return 196_608;\n // ZAI GLM\n if (model.includes('glm-'))\n return 32_768;\n // Gemma\n if (model.includes('gemma-4'))\n return 128_000;\n // Llama\n if (model.includes('llama'))\n return 8_192;\n // Cohere\n if (model.includes('command-a'))\n return 8_000;\n if (model.includes('command'))\n return 4_096;\n return 8_192; // conservative default\n}\n/**\n * Returns the max input tokens for a known model (context window minus max output), or undefined when the context\n * window is not known.\n */\nexport function getMaxInputTokens(model) {\n const contextWindow = getContextWindowSize(model);\n return contextWindow === undefined ? undefined : contextWindow - getMaxOutputTokens(model);\n}\n/**\n * Returns the known context window size (input + output), or undefined rather than guessing for an unknown model.\n */\nexport function getContextWindowSize(model) {\n model = model.toLowerCase();\n // Claude models\n if (model.includes('claude')) {\n if (isClaudeVersionGTE(model, 4, 7))\n return 1_000_000;\n return 200_000;\n }\n // Gemini models\n if (model.includes('gemini')) {\n if (model.includes('-1.0-'))\n return 32_000;\n return 1_000_000; // Gemini 1.5, 2.0, 2.5, 3 all support 1M\n }\n // OpenAI o-series (check before gpt-4 to avoid false matches)\n if (/(?:^|[~/.])o\\d+(?:[-_.]|$)/.test(model.toLowerCase()))\n return 200_000;\n // GPT models — provider-specific limits are applied by the provider overlay.\n if (model.includes('gpt-5-chat-latest'))\n return 128_000;\n if (model.includes('gpt-5.4-mini') || model.includes('gpt-5.4-nano'))\n return 400_000;\n if (isOpenAIGptVersionGTE(model, 5, 4))\n return 1_050_000;\n if (isOpenAIGptVersionGTE(model, 5, 0))\n return 400_000;\n if (model.includes('gpt-oss'))\n return 131_072;\n if (model.includes('gpt-4.1') || model.includes('gpt-4-1'))\n return 1_000_000;\n if (model.includes('gpt-4-turbo') || model.includes('gpt-4o'))\n return 128_000;\n if (model.includes('gpt-4'))\n return 8_000;\n if (model.includes('gpt-3.5'))\n return 16_000;\n // Grok\n if (isModelFamilyVersionGTE(model, 'grok-', 4, 3))\n return 1_000_000;\n if (model.includes('grok-4.1') || model.includes('grok-4-1'))\n return 256_000;\n if (model.includes('grok'))\n return 131_072;\n // Amazon Nova\n if (model.includes('nova'))\n return 300_000;\n // Mistral\n if (/(?:mistral|mixtral|ministral|magistral|voxtral|codestral|devstral|leanstral|mathstral|pixtral)/.test(model)) {\n return getMistralModelKnowledge(model).context_window;\n }\n // DeepSeek\n if (isDeepSeekV32OrLater(model))\n return 163_840;\n if (model.includes('deepseek-r1-0528'))\n return 163_840;\n if (model.includes('deepseek'))\n return 128_000;\n // Qwen\n if (model.includes('qwen3-next'))\n return 262_144;\n if (model.includes('qwen3-coder'))\n return 262_144;\n if (model.includes('qwen'))\n return 262_144;\n // Kimi\n if (model.includes('kimi-k2-thinking'))\n return 262_144;\n // MiniMax\n if (model.includes('minimax-m2'))\n return 196_608;\n // ZAI GLM\n if (model.includes('glm-'))\n return 128_000;\n // Gemma\n if (model.includes('gemma-4'))\n return 256_000;\n // Llama\n if (isModelFamilyVersionGTE(model, 'llama-', 4, 0) || isModelFamilyVersionGTE(model, 'llama', 4, 0)) {\n return model.includes('scout') ? 10_000_000 : 1_000_000;\n }\n if (model.includes('llama-3.1') || model.includes('llama-3.2') || model.includes('llama-3.3'))\n return 128_000;\n if (model.includes('llama'))\n return 8_000;\n // Cohere\n if (model.includes('command-a'))\n return 256_000;\n if (model.includes('command'))\n return 128_000;\n return undefined;\n}\n//# sourceMappingURL=context-windows.js.map","// ============== Provider details ===============\nexport var Providers;\n(function (Providers) {\n Providers[\"openai\"] = \"openai\";\n Providers[\"openai_compatible\"] = \"openai_compatible\";\n Providers[\"azure_openai\"] = \"azure_openai\";\n Providers[\"azure_foundry\"] = \"azure_foundry\";\n Providers[\"huggingface_ie\"] = \"huggingface_ie\";\n Providers[\"replicate\"] = \"replicate\";\n Providers[\"bedrock\"] = \"bedrock\";\n Providers[\"bedrock_mantle\"] = \"bedrock_mantle\";\n Providers[\"vertexai\"] = \"vertexai\";\n Providers[\"togetherai\"] = \"togetherai\";\n Providers[\"mistralai\"] = \"mistralai\";\n Providers[\"groq\"] = \"groq\";\n Providers[\"watsonx\"] = \"watsonx\";\n Providers[\"xai\"] = \"xai\";\n Providers[\"anthropic\"] = \"anthropic\";\n})(Providers || (Providers = {}));\nexport const ProviderList = {\n openai: {\n id: Providers.openai,\n name: 'OpenAI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n azure_openai: {\n id: Providers.azure_openai,\n name: 'Azure OpenAI',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n azure_foundry: {\n id: Providers.azure_foundry,\n name: 'Microsoft Foundry',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n huggingface_ie: {\n id: Providers.huggingface_ie,\n name: 'HuggingFace Inference Endpoint',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n },\n replicate: {\n id: Providers.replicate,\n name: 'Replicate',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: true,\n },\n bedrock: {\n id: Providers.bedrock,\n name: 'Amazon Bedrock',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n endpointPlaceholder: 'region name (eg. us-east-1)',\n supportSearch: false,\n },\n bedrock_mantle: {\n id: Providers.bedrock_mantle,\n name: 'Amazon Bedrock Mantle',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'region name (eg. us-west-2)',\n supportSearch: false,\n },\n vertexai: {\n id: Providers.vertexai,\n name: 'Google Agent Platform (Vertex AI)',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n togetherai: {\n id: Providers.togetherai,\n name: 'Together AI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n mistralai: {\n id: Providers.mistralai,\n name: 'Mistral AI',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n groq: {\n id: Providers.groq,\n name: 'Groq Cloud',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n watsonx: {\n id: Providers.watsonx,\n name: 'IBM WatsonX',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n xai: {\n id: Providers.xai,\n name: 'xAI (Grok)',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n openai_compatible: {\n id: Providers.openai_compatible,\n name: 'OpenAI Compatible',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'https://api.example.com/v1',\n supportSearch: false,\n },\n anthropic: {\n id: Providers.anthropic,\n name: 'Anthropic',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\n/**\n * Standardized error class for Llumiverse driver errors.\n *\n * Normalizes errors from different LLM providers (OpenAI, Anthropic, Bedrock, VertexAI, etc.)\n * into a consistent format. The primary value is the `retryable` flag, which enables upstream\n * consumers to implement smart retry logic.\n *\n * @example\n * ```typescript\n * try {\n * const result = await driver.execute(segments, options);\n * } catch (error) {\n * if (LlumiverseError.isLlumiverseError(error)) {\n * console.log(`Provider: ${error.context.provider}`);\n * console.log(`Model: ${error.context.model}`);\n * console.log(`Retryable: ${error.retryable}`);\n *\n * if (error.retryable) {\n * // Implement retry logic with exponential backoff\n * await retryWithBackoff(() => driver.execute(segments, options));\n * } else {\n * // Handle non-retryable error (e.g., invalid API key, malformed request)\n * logError(error);\n * }\n * }\n * throw error;\n * }\n * ```\n */\nexport class LlumiverseError extends Error {\n /**\n * HTTP status code (e.g., 429, 500) if available.\n * Undefined if the error doesn't have a numeric status code.\n */\n code;\n /**\n * Provider-specific error name/type (e.g., \"ThrottlingException\", \"ValidationException\").\n * Optional - used to preserve the semantic error type from the provider SDK.\n */\n name;\n /**\n * Whether this error is retryable.\n * - True: Definitely retryable (rate limits, timeouts, server errors)\n * - False: Definitely not retryable (auth failures, invalid requests, malformed schemas)\n * - Undefined: Unknown retryability - allows consumers to decide default behavior\n *\n * When undefined, consumers can choose their retry strategy:\n * - Conservative: Don't retry unknown errors (avoid spam)\n * - Resilient: Retry unknown errors (prioritize success)\n */\n retryable;\n /**\n * Context about where and how the error occurred.\n * Includes provider, model, operation type.\n */\n context;\n /**\n * The original error from the provider SDK.\n * Preserved for debugging and detailed error inspection.\n */\n originalError;\n constructor(message, retryable, context, originalError, code, name) {\n super(message);\n this.name = name || 'LlumiverseError';\n this.code = code;\n this.retryable = retryable;\n this.context = context;\n this.originalError = originalError;\n // Preserve stack trace from original error if available\n if (originalError instanceof Error && originalError.stack) {\n this.stack = originalError.stack;\n }\n }\n /**\n * Serialize the error to JSON for logging or transmission.\n * Includes all error properties except the original error object itself.\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n retryable: this.retryable,\n context: this.context,\n stack: this.stack,\n // Include original error message if available\n originalErrorMessage: this.originalError instanceof Error ? this.originalError.message : String(this.originalError),\n };\n }\n /**\n * Type guard to check if an error is a LlumiverseError.\n * Useful for conditional error handling.\n *\n * @param error - The error to check\n * @returns True if the error is a LlumiverseError\n */\n static isLlumiverseError(error) {\n return error instanceof LlumiverseError;\n }\n}\n/** Namespace used by agent conversations that require stable Claude cache layout. */\nexport const AGENT_PROMPT_CACHE_KEY_PREFIX = 'agent-';\n/** Stable prefixes shared by prompt generators and cached-conversation deduplication. */\nexport const JSON_SCHEMA_INSTRUCTION_PREFIX = 'The answer must be a JSON object using the following JSON Schema:';\nexport const TOOL_AWARE_JSON_SCHEMA_INSTRUCTION_PREFIX = 'When not calling tools, the answer must be a JSON object using the following JSON Schema:';\n//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n SharedOptions[\"effort\"] = \"effort\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n OptionType[\"json_object\"] = \"json_object\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\n/**\n * @deprecated This is deprecated. Use CompletionResult.type information instead.\n */\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { getModelCapabilitiesAnthropic } from './capability/anthropic.js';\nimport { getModelCapabilitiesAzureFoundry } from './capability/azure_foundry.js';\nimport { getBedrockModelCapabilities, getBedrockModelKnowledge } from './capability/bedrock-models.js';\nimport { getMistralModelKnowledge } from './capability/mistral.js';\nimport { getModelCapabilitiesOpenAI } from './capability/openai.js';\nimport { getModelCapabilitiesVertexAI } from './capability/vertexai.js';\nimport { getContextWindowSize, getMaxOutputTokens } from './options/context-windows.js';\nimport { getOpenAIReasoningEffortLevels, isGeminiModelVersionGte, isModelFamilyVersionGTE, } from './options/version-parsing.js';\nimport { Providers } from './types.js';\nconst EXACT_MODEL_OVERRIDES = {\n 'chat-latest': {\n family: 'gpt',\n source_provider: 'openai',\n context_window: 400_000,\n max_output_tokens: 128_000,\n },\n // OpenAI image endpoints are not text inference models even though their IDs contain `gpt`.\n 'gpt-image-1': {\n family: 'image',\n capabilities: {\n input: { text: true, image: true, audio: false, video: false },\n output: { text: false, image: true, audio: false, video: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n },\n 'gpt-realtime-translate': {\n family: 'realtime',\n context_window: 16_000,\n max_output_tokens: 2_000,\n capabilities: {\n input: { text: false, image: false, audio: true, video: false },\n output: { text: true, image: false, audio: true, video: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n },\n 'gpt-5-chat-latest': {\n family: 'gpt',\n source_provider: 'openai',\n context_window: 128_000,\n max_output_tokens: 16_384,\n },\n};\nconst GENERIC_CAPABILITIES = {\n input: { text: true },\n output: { text: true },\n};\nfunction normalizeSourceModelId(model) {\n const normalized = model.trim().toLowerCase().replace(/^~/, '');\n // Azure Foundry uses deployment::source-model. Resolve family semantics from the source half, not the\n // customer-chosen deployment name, before applying transport behavior.\n const sourceQualified = normalized.includes('::') ? (normalized.split('::').pop() ?? normalized) : normalized;\n const slash = sourceQualified.lastIndexOf('/');\n const leaf = slash === -1 ? sourceQualified : sourceQualified.slice(slash + 1);\n return leaf.replace(/^(?:global|us|eu|apac)\\./, '').replace(/^(?:openai|anthropic|google|xai)\\./, '');\n}\nfunction getModelAliases(model) {\n const normalized = model.trim().toLowerCase();\n const aliases = [normalized, normalizeSourceModelId(normalized)];\n return [...new Set(aliases)];\n}\nfunction inferFamily(model) {\n const normalized = normalizeSourceModelId(model);\n if (/(^|[-_.:])(?:embed|embedding|vector)(?:[-_.:]|$)/.test(normalized)) {\n return { family: 'embedding' };\n }\n if (/(?:prompt-guard|moderation|safeguard)/.test(normalized))\n return { family: 'moderation' };\n if (normalized.includes('grok') && normalized.includes('image')) {\n return { family: 'image', source_provider: 'xai' };\n }\n if (normalized.includes('gpt-image') || normalized.includes('dall-e') || normalized.includes('imagen-')) {\n return { family: 'image', source_provider: normalized.includes('imagen') ? 'google' : 'openai' };\n }\n if (/(?:whisper|transcribe)/.test(normalized))\n return { family: 'transcription', source_provider: 'openai' };\n if (/(?:^|[-_.])tts(?:[-_.]|$)/.test(normalized))\n return { family: 'speech', source_provider: 'openai' };\n if (normalized.includes('realtime'))\n return { family: 'realtime', source_provider: 'openai' };\n if (/(?:^|[-_.])audio(?:[-_.]|$)/.test(normalized))\n return { family: 'audio', source_provider: 'openai' };\n if (normalized.includes('sora'))\n return { family: 'video', source_provider: 'openai' };\n if (normalized.includes('gemini'))\n return { family: 'gemini', source_provider: 'google' };\n if (normalized.includes('claude'))\n return { family: 'claude', source_provider: 'anthropic' };\n if (normalized.includes('gpt') || /^o\\d+(?:[-_.]|$)/.test(normalized)) {\n return { family: 'gpt', source_provider: 'openai' };\n }\n if (normalized.includes('grok'))\n return { family: 'grok', source_provider: 'xai' };\n if (normalized.includes('nemotron'))\n return { family: 'nemotron', source_provider: 'nvidia' };\n if (/(?:mistral|mixtral|ministral|magistral|voxtral|codestral|devstral|leanstral|mathstral|pixtral)/.test(normalized)) {\n return { family: 'mistral', source_provider: 'mistralai' };\n }\n for (const family of ['llama', 'qwen', 'deepseek', 'gemma', 'mistral', 'kimi', 'minimax', 'glm']) {\n if (normalized.includes(family))\n return { family };\n }\n return { family: 'generic' };\n}\nfunction getCanonicalCapabilities(model, family) {\n switch (family) {\n case 'gemini':\n return getModelCapabilitiesVertexAI(model);\n case 'claude':\n return getModelCapabilitiesAnthropic(model);\n case 'gpt': {\n const capabilities = getModelCapabilitiesOpenAI(model);\n return {\n ...capabilities,\n input: {\n ...capabilities.input,\n text: capabilities.input.text ?? true,\n image: capabilities.input.image ?? true,\n },\n output: {\n ...capabilities.output,\n text: capabilities.output.text ?? true,\n },\n tool_support: capabilities.tool_support ?? true,\n tool_support_streaming: capabilities.tool_support_streaming ?? capabilities.tool_support ?? true,\n };\n }\n case 'embedding':\n return {\n input: { text: true },\n output: { embed: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'moderation':\n return {\n input: { text: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'transcription':\n return {\n input: { audio: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'speech':\n return {\n input: { text: true },\n output: { audio: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'realtime':\n return {\n input: { text: true, image: true, audio: true },\n output: { text: true, audio: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'audio':\n return {\n input: { text: true, audio: true },\n output: { text: true, audio: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'video':\n return {\n input: { text: true, image: true, video: true },\n output: { video: true, audio: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'image':\n return { input: { text: true, image: true }, output: { image: true }, tool_support: false };\n case 'grok':\n return {\n input: {\n text: true,\n image: model.includes('vision') || isModelFamilyVersionGTE(model, 'grok-', 4, 3),\n },\n output: { text: true },\n tool_support: true,\n };\n case 'llama':\n return {\n // Future Llama generations inherit the newest known family behavior until a provider documents\n // a narrower exception.\n input: { text: true, image: model.includes('vision') || isLlamaVersionGte(model, 4) },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'gemma': {\n const normalized = model.toLowerCase();\n const image = (normalized.includes('gemma-3') &&\n !normalized.includes('gemma-3-1b') &&\n !normalized.includes('gemma-3-270m')) ||\n normalized.includes('gemma-4');\n return {\n input: { text: true, image },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n }\n case 'qwen': {\n const normalized = model.toLowerCase();\n const qwenVision = normalized.includes('qwen3.5') ||\n ['qwen2.5', 'qwen3'].some((familyPrefix) => {\n const familyIndex = normalized.indexOf(familyPrefix);\n if (familyIndex === -1)\n return false;\n const suffix = normalized.slice(familyIndex + familyPrefix.length);\n return suffix.includes('-vl') || suffix.includes('.vl');\n });\n return {\n input: { text: true, image: qwenVision },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n }\n case 'deepseek':\n case 'kimi':\n case 'minimax':\n case 'glm':\n return { input: { text: true }, output: { text: true }, tool_support: true, tool_support_streaming: true };\n case 'nemotron':\n return {\n input: { text: true, image: model.includes('nemotron-nano-12b') },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'mistral':\n return getMistralModelKnowledge(model).capabilities;\n default:\n return { ...GENERIC_CAPABILITIES, input: { ...GENERIC_CAPABILITIES.input } };\n }\n}\nfunction isLlamaVersionGte(model, targetMajor) {\n return (isModelFamilyVersionGTE(model, 'llama-', targetMajor, 0) ||\n isModelFamilyVersionGTE(model, 'llama', targetMajor, 0));\n}\nfunction mergeCapabilities(base, override) {\n if (!override)\n return base;\n return {\n ...base,\n ...override,\n input: { ...base.input, ...override.input },\n output: { ...base.output, ...override.output },\n };\n}\nfunction getCanonicalLimits(sourceModel, family) {\n // Profiles only expose limits backed by known family data so option UIs do not present guesses as authoritative.\n if (family === 'audio')\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (family === 'realtime' && isModelFamilyVersionGTE(sourceModel, 'gpt-realtime-', 2, 0)) {\n // Future Realtime generations inherit the latest documented family limits until a narrower rule is known.\n return { context_window: 128_000, max_output_tokens: 32_000 };\n }\n if (family === 'gemini' && sourceModel.includes('gemini-3.1-flash-image')) {\n return { context_window: 131_072, max_output_tokens: 32_768 };\n }\n if (family === 'nemotron') {\n if (sourceModel.includes('nemotron-super-'))\n return { context_window: 256_000, max_output_tokens: 32_768 };\n const generation = sourceModel.match(/nemotron-nano-(\\d+)-/)?.[1];\n return {\n context_window: generation && Number(generation) >= 3 ? 256_000 : 128_000,\n max_output_tokens: 8_192,\n };\n }\n if (['generic', 'embedding', 'moderation', 'image', 'transcription', 'speech', 'realtime', 'video'].includes(family)) {\n return {};\n }\n if (family === 'mistral') {\n return { context_window: getMistralModelKnowledge(sourceModel).context_window };\n }\n return {\n context_window: getContextWindowSize(sourceModel),\n max_output_tokens: getMaxOutputTokens(sourceModel),\n };\n}\nfunction applyProviderOverlay(model, sourceModel, family, provider, capabilities) {\n if (provider === Providers.bedrock) {\n const bedrock = getBedrockModelCapabilities(model, 'runtime');\n const knowledge = getBedrockModelKnowledge(model);\n return { capabilities: bedrock, ...knowledge };\n }\n if (provider === Providers.bedrock_mantle) {\n const bedrock = getBedrockModelCapabilities(model, 'mantle');\n const knowledge = getBedrockModelKnowledge(model);\n return { capabilities: bedrock, ...knowledge };\n }\n // OpenRouter and other OpenAI-compatible transports retain the source model's semantic\n // capabilities, but cannot expose provider-native fields such as Vertex Flex or thinking_level.\n if (provider === Providers.openai_compatible) {\n return {\n capabilities: {\n ...capabilities,\n tool_support_streaming: capabilities.tool_support_streaming ?? capabilities.tool_support,\n },\n ...getCanonicalLimits(sourceModel, family),\n };\n }\n if (provider === Providers.azure_foundry) {\n // Deployment metadata describes the transport. Dedicated source endpoints keep their source modalities so a\n // deployment named like a GPT model cannot become text inference accidentally.\n const providerCapabilities = getModelCapabilitiesAzureFoundry(model);\n return {\n capabilities: [\n 'embedding',\n 'moderation',\n 'image',\n 'transcription',\n 'speech',\n 'realtime',\n 'audio',\n 'video',\n ].includes(family)\n ? capabilities\n : providerCapabilities,\n ...getCanonicalLimits(sourceModel, family),\n };\n }\n return {\n capabilities,\n ...getCanonicalLimits(sourceModel, family),\n };\n}\nfunction getReasoningEffortLevels(model, family, provider) {\n if (family === 'gpt') {\n if (model.includes('gpt-oss')) {\n return provider === Providers.togetherai ||\n provider === Providers.openai_compatible ||\n provider === Providers.vertexai ||\n provider === Providers.bedrock ||\n provider === Providers.bedrock_mantle ||\n provider === Providers.azure_foundry\n ? ['low', 'medium', 'high']\n : undefined;\n }\n if (provider === Providers.openai ||\n provider === Providers.azure_openai ||\n provider === Providers.openai_compatible ||\n provider === Providers.azure_foundry ||\n provider === Providers.bedrock_mantle) {\n if (/^o\\d+(?:[-_.]|$)/.test(model))\n return ['low', 'medium', 'high'];\n return Object.values(getOpenAIReasoningEffortLevels(model) ?? {});\n }\n return undefined;\n }\n if (family === 'gemini' && provider === Providers.openai_compatible && isGeminiModelVersionGte(model, '3.5')) {\n return ['minimal', 'low', 'medium', 'high'];\n }\n if (provider === Providers.mistralai && family === 'mistral') {\n return getMistralModelKnowledge(model).reasoning_effort_levels;\n }\n if (provider === Providers.xai && family === 'grok') {\n const grok420Index = model.indexOf('grok-4.20');\n if (grok420Index !== -1 && model.indexOf('multi-agent', grok420Index + 'grok-4.20'.length) !== -1) {\n return ['low', 'medium', 'high', 'xhigh'];\n }\n if (isSingleDigitGrokVersionGte(model, 4, 5))\n return ['low', 'medium', 'high'];\n if (isSingleDigitGrokVersionGte(model, 4, 3))\n return ['none', 'low', 'medium', 'high'];\n }\n return undefined;\n}\nfunction isSingleDigitGrokVersionGte(model, targetMajor, targetMinor) {\n const match = model.match(/grok-(\\d+)(?:\\.(\\d))?(?:[-_.]|$)/);\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nexport function resolveModelProfile(model, provider) {\n const canonical_id = normalizeSourceModelId(model);\n const exactOverride = EXACT_MODEL_OVERRIDES[canonical_id];\n // Family identity follows the normalized source model. Transport paths and customer deployment names must not\n // accidentally select a different family rule.\n const inferred = inferFamily(canonical_id);\n const family = exactOverride?.family ?? inferred.family;\n const source_provider = exactOverride?.source_provider ?? inferred.source_provider;\n const canonicalCapabilities = getCanonicalCapabilities(canonical_id, family);\n const vertexCapabilities = provider === Providers.vertexai ? getModelCapabilitiesVertexAI(model) : undefined;\n const hasVertexCapabilities = vertexCapabilities &&\n (Object.values(vertexCapabilities.input).some((value) => value === true) ||\n Object.values(vertexCapabilities.output).some((value) => value === true) ||\n vertexCapabilities.tool_support !== undefined);\n const baseCapabilities = hasVertexCapabilities ? vertexCapabilities : canonicalCapabilities;\n const overlay = applyProviderOverlay(model, canonical_id, family, provider, baseCapabilities);\n const reasoningEffortLevels = getReasoningEffortLevels(canonical_id, family, provider);\n return {\n model_id: model,\n canonical_id,\n family,\n source_provider,\n // Exact source-model semantics win after transport overlays. Provider inference must not turn a dedicated\n // image or other non-chat endpoint into a text model merely because its ID resembles a known family.\n capabilities: mergeCapabilities(overlay.capabilities, exactOverride?.capabilities),\n context_window: exactOverride?.context_window ?? overlay.context_window,\n max_output_tokens: exactOverride?.max_output_tokens ?? overlay.max_output_tokens,\n ...(reasoningEffortLevels?.length && { reasoning_effort_levels: reasoningEffortLevels }),\n };\n}\nexport function isModelDirectoryEmbedding(model) {\n const aliases = getModelAliases(model);\n return aliases.some((alias) => /(^|[-_.:])(?:embed|embedding|vector)(?:[-_.:]|$)/.test(alias));\n}\n//# sourceMappingURL=model-directory.js.map","import { isModelDirectoryEmbedding, resolveModelProfile } from './model-directory.js';\nexport function getModelCapabilities(model, provider) {\n //Check for locations/<location>/ prefix and remove it\n if (model.startsWith('locations/')) {\n const parts = model.split('/');\n if (parts.length >= 3) {\n model = parts.slice(2).join('/');\n }\n }\n const modelName = model.split('/').pop()?.toLowerCase();\n if (provider === 'vertexai' &&\n (modelName === 'gemini-omni-flash-preview' || modelName === 'gemini-omni-1.1-flash-preview')) {\n return {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: true, image: false, video: true, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n const capabilities = resolveModelProfile(model, provider).capabilities;\n // The platform accepts audio/video inputs but cannot return those modalities yet. Keep source output metadata in\n // the directory so enabling output support later only requires removing this execution-path mask.\n return {\n ...capabilities,\n input: { ...capabilities.input },\n output: { ...capabilities.output, audio: false, video: false },\n };\n}\nexport function supportsToolUse(model, provider, streaming = false) {\n const capabilities = getModelCapabilities(model, provider);\n if (!streaming) {\n return !!capabilities.tool_support;\n }\n // Unset tool_support_streaming means \"same as tool_support\" (OpenAI-compatible default).\n // Only an explicit false opts out of tools-while-streaming.\n return !!(capabilities.tool_support_streaming ?? capabilities.tool_support);\n}\nexport function modelModalitiesToArray(modalities) {\n return Object.entries(modalities)\n .filter(([_, isSupported]) => isSupported)\n .map(([modality]) => modality);\n}\n/** Dedicated endpoint models are not executable through the standard inference path. */\nexport function isDedicatedInferenceModel(model, provider) {\n return ['embedding', 'moderation', 'image', 'transcription', 'speech', 'realtime', 'audio', 'video'].includes(resolveModelProfile(model, provider).family);\n}\n/** Embedding endpoints are not executable through the standard inference path. */\nexport function isEmbeddingModel(model, provider) {\n if (model.type?.toLowerCase() === 'embedding')\n return true;\n if (isModelDirectoryEmbedding(model.id))\n return true;\n const modalities = [...(model.input_modalities ?? []), ...(model.output_modalities ?? [])].map((modality) => modality.toLowerCase());\n if (modalities.some((modality) => modality === 'embed' || modality === 'embedding' || modality === 'vectors')) {\n return true;\n }\n return getModelCapabilities(model.id, provider).output.embed === true;\n}\n//# sourceMappingURL=capability.js.map","import { OptionType, SharedOptions } from '../types.js';\nexport const textOptionsFallback = {\n _option_id: 'text-fallback',\n options: [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n {\n name: SharedOptions.temperature,\n type: OptionType.numeric,\n min: 0.0,\n default: 0.7,\n integer: false,\n step: 0.1,\n description: 'A higher temperature biases toward less likely tokens, making the model more creative',\n },\n {\n name: SharedOptions.top_p,\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: false,\n step: 0.1,\n description: 'Limits token sampling to the cumulative probability of the top p tokens',\n },\n {\n name: SharedOptions.top_k,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 1,\n description: 'Limits token sampling to the top k tokens',\n },\n {\n name: SharedOptions.presence_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens if they appear at least once in the text',\n },\n {\n name: SharedOptions.frequency_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens based on their frequency in the text',\n },\n {\n name: SharedOptions.stop_sequence,\n type: OptionType.string_list,\n value: [],\n description: 'The generation will halt if one of the stop sequences is output',\n },\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: 'Include visible model reasoning as separate thoughts results.',\n },\n ],\n};\n//# sourceMappingURL=fallback.js.map","import { resolveModelProfile } from '../model-directory.js';\nimport { OptionType, Providers, SharedOptions, } from '../types.js';\nimport { getMaxOutputTokens } from './context-windows.js';\nimport { textOptionsFallback } from './fallback.js';\nimport { getOpenAiCompatibleOptions } from './openai.js';\nimport { buildClaudeCacheOptions, buildClaudeCacheTtlOptions, buildClaudeEffortOptions, buildClaudeIncludeThoughtsOption, buildClaudeThinkingBudgetOption, getClaudeMaxTokensLimit, } from './shared-parsing.js';\nimport { hasSamplingParameterRestriction, isGeminiModelVersionGte } from './version-parsing.js';\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport var ThinkingLevel;\n(function (ThinkingLevel) {\n ThinkingLevel[\"HIGH\"] = \"HIGH\";\n ThinkingLevel[\"MEDIUM\"] = \"MEDIUM\";\n ThinkingLevel[\"LOW\"] = \"LOW\";\n ThinkingLevel[\"MINIMAL\"] = \"MINIMAL\";\n ThinkingLevel[\"THINKING_LEVEL_UNSPECIFIED\"] = \"THINKING_LEVEL_UNSPECIFIED\";\n})(ThinkingLevel || (ThinkingLevel = {}));\n/** Models that support Flex processing (shared, cost-efficient tier). */\nconst FLEX_SUPPORTED_GEMINI_MODELS = [\n 'gemini-3.1-flash-lite-preview',\n 'gemini-3.1-flash-image-preview',\n 'gemini-3.1-pro-preview',\n 'gemini-3-flash-preview',\n 'gemini-3-pro-image-preview',\n 'gemini-3.5-flash',\n 'gemini-3.5-flash-lite',\n 'gemini-3.6-flash',\n];\nexport function isFlexSupportedGeminiModel(model) {\n const modelName = model.split('/').pop() ?? model;\n return (FLEX_SUPPORTED_GEMINI_MODELS.some((m) => modelName.includes(m)) ||\n (modelName.includes('flash') && !modelName.includes('image') && isGeminiModelVersionGte(modelName, '3.5')));\n}\nexport function getVertexAiOptions(model, option) {\n const modelName = model.split('/').pop();\n if (modelName === 'gemini-omni-flash-preview' || modelName === 'gemini-omni-1.1-flash-preview') {\n const isOmni11 = modelName === 'gemini-omni-1.1-flash-preview';\n return {\n _option_id: 'vertexai-gemini-omni-video',\n options: [\n {\n name: 'task',\n type: OptionType.enum,\n enum: {\n 'Text to video': 'text_to_video',\n 'Image to video': 'image_to_video',\n 'References to video': 'reference_to_video',\n 'Edit video': 'edit',\n ...(isOmni11 ? { 'Extend video': 'extend' } : {}),\n },\n description: 'Video generation task. Media inputs require an explicit task.',\n },\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { Landscape: '16:9', Portrait: '9:16' },\n description: 'Aspect ratio of the generated video.',\n },\n {\n name: 'duration_seconds',\n type: OptionType.numeric,\n min: 3,\n max: 10,\n default: 5,\n integer: true,\n description: 'Duration of the generated video in seconds.',\n },\n {\n name: 'resolution',\n type: OptionType.enum,\n enum: isOmni11\n ? { '360p': '360p', '720p': '720p', '1080p': '1080p', '4K': '4k' }\n : { '720p': '720p' },\n description: 'Resolution of the generated video.',\n },\n ],\n };\n }\n if (model.includes('imagen-')) {\n return getImagenOptions(model, option);\n }\n else if (model.includes('gemini')) {\n return getGeminiOptions(model, option);\n }\n else if (model.includes('claude')) {\n return getClaudeOptions(model, option);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getOpenMaaSChatOptions(model);\n }\n return textOptionsFallback;\n}\nfunction getImagenOptions(model, option) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images,\n type: OptionType.numeric,\n min: 1,\n max: 4,\n default: 1,\n integer: true,\n description: 'Number of Images to generate',\n },\n {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n min: 0,\n max: 4294967295,\n default: 12,\n integer: true,\n description: 'The seed of the generated image',\n },\n {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Disallow the inclusion of people or faces in images': 'dont_allow',\n 'Allow generation of adults only': 'allow_adult',\n 'Allow generation of people of all ages': 'allow_all',\n },\n default: 'allow_adult',\n description: 'The safety setting for allowing the generation of people in the image',\n },\n {\n name: 'safety_setting',\n type: OptionType.enum,\n enum: {\n 'Block very few problematic prompts and responses': 'block_none',\n 'Block only few problematic prompts and responses': 'block_only_high',\n 'Block some problematic prompts and responses': 'block_medium_and_above',\n 'Strictest filtering': 'block_low_and_above',\n },\n default: 'block_medium_and_above',\n description: 'The overall safety setting',\n },\n ];\n const outputOptions = [\n {\n name: 'image_file_type',\n type: OptionType.enum,\n enum: { JPEG: 'image/jpeg', PNG: 'image/png' },\n default: 'image/png',\n description: 'The file type of the generated image',\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: 'jpeg_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 75,\n integer: true,\n description: 'The compression quality of the JPEG image',\n };\n if (option?.image_file_type === 'image/jpeg') {\n outputOptions.push(jpegQuality);\n }\n if (model.includes('generate')) {\n // Generate models\n const modeOptions = [\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { '1:1': '1:1', '4:3': '4:3', '3:4': '3:4', '16:9': '16:9', '9:16': '9:16' },\n default: '1:1',\n description: 'The aspect ratio of the generated image',\n },\n {\n name: 'add_watermark',\n type: OptionType.boolean,\n default: false,\n description: 'Add an invisible watermark to the generated image, useful for detection of AI images',\n },\n ];\n const enhanceOptions = !model.includes('generate-001')\n ? [\n {\n name: 'enhance_prompt',\n type: OptionType.boolean,\n default: true,\n description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\",\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [...commonOptions, ...modeOptions, ...outputOptions, ...enhanceOptions],\n };\n }\n if (model.includes('capability')) {\n // Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: 'edit_mode',\n type: OptionType.enum,\n enum: {\n EDIT_MODE_INPAINT_REMOVAL: 'EDIT_MODE_INPAINT_REMOVAL',\n EDIT_MODE_INPAINT_INSERTION: 'EDIT_MODE_INPAINT_INSERTION',\n EDIT_MODE_BGSWAP: 'EDIT_MODE_BGSWAP',\n EDIT_MODE_OUTPAINT: 'EDIT_MODE_OUTPAINT',\n CUSTOMIZATION_SUBJECT: 'CUSTOMIZATION_SUBJECT',\n CUSTOMIZATION_STYLE: 'CUSTOMIZATION_STYLE',\n CUSTOMIZATION_CONTROLLED: 'CUSTOMIZATION_CONTROLLED',\n CUSTOMIZATION_INSTRUCT: 'CUSTOMIZATION_INSTRUCT',\n },\n description: 'The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.',\n },\n {\n name: 'guidance_scale',\n type: OptionType.numeric,\n min: 0,\n max: 500,\n default: guidanceScaleDefault,\n integer: true,\n description: 'How closely the generation follows the prompt',\n },\n ];\n const maskOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'mask_mode',\n type: OptionType.enum,\n enum: {\n MASK_MODE_USER_PROVIDED: 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND: 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND: 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC: 'MASK_MODE_SEMANTIC',\n },\n default: 'MASK_MODE_USER_PROVIDED',\n description: 'How should the mask for the generation be provided',\n },\n {\n name: 'mask_dilation',\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: true,\n description: 'The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.',\n },\n ]\n : [];\n const maskClassOptions = option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC\n ? [\n {\n name: 'mask_class',\n type: OptionType.string_list,\n default: [],\n description: 'Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids',\n },\n ]\n : [];\n const editOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'edit_steps',\n type: OptionType.numeric,\n default: 75,\n integer: true,\n description: 'The number of steps for the base image generation, more steps means more time and better quality',\n },\n ]\n : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED ||\n option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT\n ? [\n {\n name: 'controlType',\n type: OptionType.enum,\n enum: {\n 'Face Mesh': 'CONTROL_TYPE_FACE_MESH',\n Canny: 'CONTROL_TYPE_CANNY',\n Scribble: 'CONTROL_TYPE_SCRIBBLE',\n },\n default: 'CONTROL_TYPE_CANNY',\n description: 'Method used to generate the control image',\n },\n {\n name: 'controlImageComputation',\n type: OptionType.boolean,\n default: true,\n description: 'Should the control image be computed from the input image, or is it provided',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ],\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiEffortOptions(model) {\n if (model.includes('gemini-3-pro-image')) {\n return { High: 'high' };\n }\n if (model.includes('gemini-3.1-flash-image')) {\n return { Minimal: 'minimal', High: 'high' };\n }\n if (model.includes('pro') && isGeminiModelVersionGte(model, '3.1')) {\n return { Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\nfunction getGeminiThinkingOptionItems(model) {\n return [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: SharedOptions.effort,\n type: OptionType.enum,\n enum: getGeminiEffortOptions(model),\n description: 'Higher thinking levels may improve quality, but increase response times and token costs',\n },\n ];\n}\nfunction getGeminiOptions(model, option) {\n // Special handling for gemini image / nano banana models\n if (model.includes('image')) {\n const isGemini25OrLater = isGeminiModelVersionGte(model, '2.5');\n const isGemini3OrLater = isGeminiModelVersionGte(model, '3.0');\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\n 'max_tokens',\n 'presence_penalty',\n 'frequency_penalty',\n 'seed',\n 'top_k',\n 'include_thoughts',\n ];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Set max temperature to 2.0\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature && option.type === OptionType.numeric) {\n return {\n ...option,\n max: 2.0,\n };\n }\n return option;\n });\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'Maximum output tokens',\n },\n ];\n const imageOptions = [];\n // Aspect ratio, person generation, prominent people: 2.5+\n if (isGemini25OrLater) {\n imageOptions.push({\n name: 'image_aspect_ratio',\n type: OptionType.enum,\n enum: {\n '1:1': '1:1',\n '2:3': '2:3',\n '3:2': '3:2',\n '3:4': '3:4',\n '4:3': '4:3',\n '9:16': '9:16',\n '16:9': '16:9',\n '21:9': '21:9',\n },\n default: '1:1',\n description: 'Aspect ratio of the generated images',\n }, {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Allow all people': 'ALLOW_ALL',\n 'Allow adults only': 'ALLOW_ADULT',\n 'Do not generate people': 'ALLOW_NONE',\n },\n default: 'ALLOW_ALL',\n description: 'Controls the generation of people in images',\n }, {\n name: 'prominent_people',\n type: OptionType.enum,\n enum: {\n 'Allow prominent people': 'ALLOW_PROMINENT_PEOPLE',\n 'Block prominent people': 'BLOCK_PROMINENT_PEOPLE',\n },\n description: 'Controls whether prominent people (celebrities) can be generated',\n });\n }\n // Resolution settings: 3.0+\n if (isGemini3OrLater) {\n imageOptions.push({\n name: 'image_size',\n type: OptionType.enum,\n enum: {\n '1K': '1K',\n '2K': '2K',\n '4K': '4K',\n },\n default: '1K',\n description: 'Size of generated images',\n });\n }\n // Output format: all image models\n imageOptions.push({\n name: 'output_mime_type',\n type: OptionType.enum,\n enum: {\n PNG: 'image/png',\n JPEG: 'image/jpeg',\n },\n default: 'image/png',\n description: 'MIME type of the generated image',\n refresh: true,\n });\n if (option?.output_mime_type === 'image/jpeg') {\n imageOptions.push({\n name: 'output_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 90,\n integer: true,\n description: 'Compression quality for JPEG images (0-100)',\n });\n }\n // Thinking options: 3.0+ (same as non-image counterparts)\n const thinkingOptions = isGemini3OrLater ? getGeminiThinkingOptionItems(model) : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, ...imageOptions, ...thinkingOptions],\n };\n }\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'include_thoughts'];\n const commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n const seedOption = {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n integer: true,\n description: 'The seed for the generation, useful for reproducibility',\n };\n if (isGeminiModelVersionGte(model, '3.0')) {\n const serviceTierOptions = isFlexSupportedGeminiModel(model)\n ? [\n {\n name: 'service_tier',\n type: OptionType.enum,\n enum: { Default: 'default', Flex: 'flex' },\n default: 'default',\n description: 'Select the Vertex AI processing tier for this request.',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ...getGeminiThinkingOptionItems(model),\n ...serviceTierOptions,\n ],\n };\n }\n if (model.includes('-2.5-')) {\n // Gemini 2.5 thinking models\n // Set budget token ranges based on model variant\n let budgetMin = -1;\n let budgetMax = 24576;\n let budgetDescription = '';\n if (model.includes('flash-lite')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash Lite default: Model does not think. ' +\n 'Range: 512-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('flash')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 0-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('pro')) {\n budgetMin = -1;\n budgetMax = 32768;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Pro default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 128-32768 tokens. ' +\n 'Cannot disable thinking - minimum 128 tokens. Set to -1 for dynamic thinking.';\n }\n const geminiThinkingOptions = [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: 'thinking_budget_tokens',\n type: OptionType.numeric,\n min: budgetMin,\n max: budgetMax,\n default: undefined,\n integer: true,\n step: 100,\n description: budgetDescription,\n },\n ];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption, ...geminiThinkingOptions],\n };\n }\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption],\n };\n}\nfunction getClaudeOptions(model, option) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'presence_penalty', 'frequency_penalty', 'include_thoughts'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Opus 4.7+ models no longer support temperature, top_p, top_k (returns 400 error)\n // Opus 4.6 and Sonnet 4.6 still support these parameters\n const hasSamplingRestriction = hasSamplingParameterRestriction(model);\n if (hasSamplingRestriction) {\n commonOptions = commonOptions.filter((option) => option.name !== SharedOptions.temperature &&\n option.name !== SharedOptions.top_p &&\n option.name !== 'top_k');\n }\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n return {\n _option_id: 'vertexai-claude',\n options: [\n ...max_tokens,\n ...commonOptions,\n ...buildClaudeEffortOptions(model),\n ...buildClaudeThinkingBudgetOption(model),\n ...buildClaudeIncludeThoughtsOption(model),\n ...buildClaudeCacheOptions(),\n ...buildClaudeCacheTtlOptions(option?.cache_enabled),\n ],\n };\n}\nfunction isOpenMaaSChatModel(model) {\n const normalized = model.toLowerCase();\n // Open MaaS chat option support is family-based on purpose: new model releases inherit the\n // current OpenAI-compatible option surface unless a specific older model needs an exception.\n return ['deepseek', 'gemma-', 'glm-', 'gpt-oss', 'grok', 'kimi', 'llama', 'minimax', 'qwen', 'zai-org'].some((modelPart) => normalized.includes(modelPart));\n}\nfunction getOpenMaaSChatOptions(model) {\n const compatible = getOpenAiCompatibleOptions(model, undefined, resolveModelProfile(model, Providers.vertexai));\n const commonOptions = compatible.options\n // Vertex Open MaaS does not offer these OpenAI-native penalty fields consistently across source families.\n .filter((option) => option.name !== SharedOptions.presence_penalty && option.name !== SharedOptions.frequency_penalty)\n .map((commonOption) => {\n if (model.includes('llama') &&\n commonOption.name === SharedOptions.temperature &&\n commonOption.type === OptionType.numeric) {\n return {\n ...commonOption,\n max: 1.0,\n };\n }\n return commonOption;\n });\n return {\n ...compatible,\n options: commonOptions,\n };\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes('image')) {\n return isGeminiModelVersionGte(model, '2.5') ? 32768 : 8192;\n }\n if (model.includes('thinking') || isGeminiModelVersionGte(model, '2.5')) {\n return 65535; // API upper bound is exclusive\n }\n if (model.includes('ultra') || model.includes('vision')) {\n return 2048;\n }\n return 8192;\n}\nexport function getMaxTokensLimitVertexAi(model) {\n if (model.includes('imagen-')) {\n return 0; // Imagen models do not have a max tokens limit in the same way as text models\n }\n else if (model.includes('claude')) {\n return getClaudeMaxTokensLimit(model);\n }\n else if (model.includes('gemini')) {\n return getGeminiMaxTokensLimit(model);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getMaxOutputTokens(model);\n }\n return 8192; // Default fallback limit\n}\n//# sourceMappingURL=vertexai.js.map","import { ProviderList, Providers } from '@llumiverse/common';\n// Virtual providers from studio\nexport var CustomProviders;\n(function (CustomProviders) {\n CustomProviders[\"virtual_lb\"] = \"virtual_lb\";\n CustomProviders[\"virtual_mediator\"] = \"virtual_mediator\";\n CustomProviders[\"test\"] = \"test\";\n})(CustomProviders || (CustomProviders = {}));\n// The const and the type are one declaration in two halves: the object is what `z.enum()` reads the\n// members off, and the type is inferred back from that schema rather than restated as\n// `Providers | CustomProviders` — which is the same union, but a second statement of it.\nexport const SupportedProviders = {\n ...Providers,\n ...CustomProviders,\n};\nconst CustomProvidersList = {\n virtual_lb: {\n id: CustomProviders.virtual_lb,\n name: 'Virtual - Load Balancer',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n virtual_mediator: {\n id: CustomProviders.virtual_mediator,\n name: 'Virtual - Mediator',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n test: {\n id: CustomProviders.test,\n name: 'Test LLM',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\nexport const SupportedProvidersList = {\n ...ProviderList,\n ...CustomProvidersList,\n};\n//# sourceMappingURL=environment.js.map","export const MEMBERS_GROUP_NAME = 'members';\n//# sourceMappingURL=group.js.map","export var SupportedIntegrations;\n(function (SupportedIntegrations) {\n SupportedIntegrations[\"gladia\"] = \"gladia\";\n SupportedIntegrations[\"github\"] = \"github\";\n SupportedIntegrations[\"aws\"] = \"aws\";\n SupportedIntegrations[\"magic_pdf\"] = \"magic_pdf\";\n SupportedIntegrations[\"serper\"] = \"serper\";\n SupportedIntegrations[\"exa\"] = \"exa\";\n SupportedIntegrations[\"linkup\"] = \"linkup\";\n SupportedIntegrations[\"resend\"] = \"resend\";\n SupportedIntegrations[\"ask_user_webhook\"] = \"ask_user_webhook\";\n})(SupportedIntegrations || (SupportedIntegrations = {}));\n//# sourceMappingURL=integrations.js.map","// Interaction values that exist at runtime and are read by the API schemas.\n//\n// Split out of `interaction.ts` for the reason `project-values.ts` was split out of `project.ts`:\n// `InteractionExecutionConfigurationSchema` is `z.enum(...)` over these two, and importing\n// `interaction.ts` from a schema module at runtime would both be a cycle risk and pull the largest\n// module in the package into every schema consumer. Re-exported from `interaction.ts`, so this is a\n// move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: the first declaration in the file would\n// otherwise inherit this note as its published component `description`, the way `project-values.ts`\n// records.\nexport var RunDataStorageLevel;\n(function (RunDataStorageLevel) {\n RunDataStorageLevel[\"STANDARD\"] = \"STANDARD\";\n RunDataStorageLevel[\"RESTRICTED\"] = \"RESTRICTED\";\n RunDataStorageLevel[\"DEBUG\"] = \"DEBUG\";\n})(RunDataStorageLevel || (RunDataStorageLevel = {}));\nexport var ConfigModes;\n(function (ConfigModes) {\n ConfigModes[\"RUN_AND_INTERACTION_CONFIG\"] = \"RUN_AND_INTERACTION_CONFIG\";\n ConfigModes[\"RUN_CONFIG_ONLY\"] = \"RUN_CONFIG_ONLY\";\n ConfigModes[\"INTERACTION_CONFIG_ONLY\"] = \"INTERACTION_CONFIG_ONLY\";\n})(ConfigModes || (ConfigModes = {}));\n//# sourceMappingURL=interaction-values.js.map","/**\n * `RunDataStorageLevel` and `ConfigModes` live in `./interaction-values.js` so the API schemas can\n * read them without importing this module back. Re-exported here so every existing import path keeps\n * working.\n */\nexport * from './interaction-values.js';\nexport var InteractionStatus;\n(function (InteractionStatus) {\n InteractionStatus[\"draft\"] = \"draft\";\n InteractionStatus[\"published\"] = \"published\";\n InteractionStatus[\"archived\"] = \"archived\";\n InteractionStatus[\"code\"] = \"code\";\n InteractionStatus[\"unknown\"] = \"unknown\";\n})(InteractionStatus || (InteractionStatus = {}));\nexport var ExecutionRunStatus;\n(function (ExecutionRunStatus) {\n ExecutionRunStatus[\"created\"] = \"created\";\n ExecutionRunStatus[\"processing\"] = \"processing\";\n ExecutionRunStatus[\"completed\"] = \"completed\";\n ExecutionRunStatus[\"failed\"] = \"failed\";\n})(ExecutionRunStatus || (ExecutionRunStatus = {}));\n/**\n * Defines the scope for agent search operations.\n */\nexport var AgentSearchScope;\n(function (AgentSearchScope) {\n /**\n * Search is scoped to a specific collection.\n */\n AgentSearchScope[\"Collection\"] = \"collection\";\n})(AgentSearchScope || (AgentSearchScope = {}));\n// Re-exported from email.ts for backwards compatibility\nexport { isEmailChannel, isInteractiveChannel, } from './email.js';\nconst AGENT_RESOURCE_TYPES = [\n 'document',\n 'collection',\n 'content_type',\n 'interaction',\n 'prompt',\n 'agent',\n 'workflow',\n 'process',\n 'process_run',\n 'interaction_run',\n 'view',\n];\nconst AGENT_RESOURCE_ACTIONS = ['created', 'updated', 'deleted'];\n/**\n * Validate and normalize an untrusted value into a clean list of resource references. References\n * cross the wire and may originate from external/MCP tools, so malformed entries are dropped\n * rather than throwing, and an empty/absent label falls back to the id.\n */\nexport function normalizeAgentResources(value) {\n if (!Array.isArray(value))\n return [];\n const result = [];\n for (const entry of value) {\n if (!entry || typeof entry !== 'object')\n continue;\n const ref = entry;\n const { type, id, label, action, revision_id } = ref;\n if (typeof type !== 'string' || !AGENT_RESOURCE_TYPES.includes(type))\n continue;\n if (typeof id !== 'string' || id.length === 0)\n continue;\n if (typeof action !== 'string' || !AGENT_RESOURCE_ACTIONS.includes(action))\n continue;\n result.push({\n type: type,\n id,\n label: typeof label === 'string' && label.length > 0 ? label : id,\n action: action,\n ...(typeof revision_id === 'string' && revision_id.length > 0 ? { revision_id } : {}),\n });\n }\n return result;\n}\n// ================= end async execution payloads ====================\nexport var RunSourceTypes;\n(function (RunSourceTypes) {\n RunSourceTypes[\"api\"] = \"api\";\n RunSourceTypes[\"cli\"] = \"cli\";\n RunSourceTypes[\"ui\"] = \"ui\";\n RunSourceTypes[\"webhook\"] = \"webhook\";\n RunSourceTypes[\"test\"] = \"test-data\";\n RunSourceTypes[\"system\"] = \"system\";\n RunSourceTypes[\"schedule\"] = \"schedule\";\n})(RunSourceTypes || (RunSourceTypes = {}));\n/**\n * Source of the resolved model configuration\n */\nexport var ModelSource;\n(function (ModelSource) {\n /** Model was explicitly provided in the execution config */\n ModelSource[\"config\"] = \"config\";\n /** Model comes from the interaction definition */\n ModelSource[\"interaction\"] = \"interaction\";\n /** Model comes from environment's default_model */\n ModelSource[\"environmentDefault\"] = \"environmentDefault\";\n /** Model comes from project system interaction defaults */\n ModelSource[\"projectSystemDefault\"] = \"projectSystemDefault\";\n /** Model comes from project base defaults */\n ModelSource[\"projectBaseDefault\"] = \"projectBaseDefault\";\n /** Model comes from project modality-specific defaults */\n ModelSource[\"projectModalityDefault\"] = \"projectModalityDefault\";\n /** Model comes from legacy project defaults */\n ModelSource[\"projectLegacyDefault\"] = \"projectLegacyDefault\";\n})(ModelSource || (ModelSource = {}));\n//# sourceMappingURL=interaction.js.map","import { Permission } from './access-control-values.js';\nexport const OAUTH_SCOPE_OPENID = 'openid';\nexport const OAUTH_SCOPE_PROFILE = 'profile';\nexport const OAUTH_SCOPE_OFFLINE_ACCESS = 'offline_access';\nexport const OAUTH_SCOPE_PROJECT_SWITCH = 'project_switch';\nexport const OAUTH_STANDARD_SCOPES = [OAUTH_SCOPE_OPENID, OAUTH_SCOPE_PROFILE, OAUTH_SCOPE_OFFLINE_ACCESS];\n/**\n * Permissions that are never grantable as an OAuth scope: they administer persistent credentials,\n * hand out secret material, or are internal to the platform's own consoles.\n */\nconst NON_OAUTH_PERMISSION_SCOPES = new Set([\n Permission.api_key_create,\n Permission.api_key_update,\n Permission.api_key_delete,\n Permission.api_key_secret_read,\n Permission.manage_billing,\n Permission.billing_read,\n Permission.iam_impersonate,\n Permission.studio_access,\n]);\nconst OAUTH_PERMISSION_SCOPES = Object.values(Permission).filter((scope) => !NON_OAUTH_PERMISSION_SCOPES.has(scope));\n/** The permissions a client may request as OAuth scopes. */\nexport function getOAuthPermissionScopes() {\n return [...OAUTH_PERMISSION_SCOPES];\n}\n//# sourceMappingURL=oauth-scopes.js.map","export const DEFAULT_EVENT_AGENT_INTERACTION_REF = 'sys:GeneralAgent';\n//# sourceMappingURL=platform-event.js.map","// Project values that exist at runtime — currently the system role catalog.\n//\n// Split out of `project.ts` for the reason `account-values.ts` was split out of `user.ts`: the API\n// schemas need `SystemRoles` at runtime (`z.enum(SystemRoles)`), and `project.ts` needs the types\n// those schemas infer. Re-exported from `project.ts`, so this is a move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: `SystemRoles` is the first declaration in the\n// file, and zeno-server's scanner attaches a leading DOC comment to the declaration that follows it.\n// Written as JSDoc, this note became the published `SystemRoles.description` in the OpenAPI\n// document — internal migration commentary shipped to every generated client. The sibling\n// `access-control-values.ts` keeps its JSDoc header only because none of its enums are resolved\n// through that path.\n// Moved here from `project.ts` for the same reason: `ResourceVisibilitySchema` is `z.enum(...)` over\n// it, and a runtime import of `project.ts` from the schema modules would be a cycle. The enum stays\n// the single statement of the values — the schema reads them rather than restating them, which is\n// why `ResourceVisibility` is not a canonical alias.\nexport var ResourceVisibility;\n(function (ResourceVisibility) {\n ResourceVisibility[\"public\"] = \"public\";\n ResourceVisibility[\"account\"] = \"account\";\n ResourceVisibility[\"project\"] = \"project\";\n})(ResourceVisibility || (ResourceVisibility = {}));\nexport var SystemRoles;\n(function (SystemRoles) {\n SystemRoles[\"owner\"] = \"owner\";\n SystemRoles[\"admin\"] = \"admin\";\n SystemRoles[\"manager\"] = \"manager\";\n SystemRoles[\"developer\"] = \"developer\";\n SystemRoles[\"application\"] = \"application\";\n SystemRoles[\"automation\"] = \"automation\";\n SystemRoles[\"content_processor\"] = \"content_processor\";\n SystemRoles[\"consumer\"] = \"consumer\";\n SystemRoles[\"executor\"] = \"executor\";\n SystemRoles[\"reader\"] = \"reader\";\n SystemRoles[\"auditor\"] = \"auditor\";\n SystemRoles[\"support\"] = \"support\";\n SystemRoles[\"billing\"] = \"billing\";\n SystemRoles[\"member\"] = \"member\";\n SystemRoles[\"app_member\"] = \"app_member\";\n SystemRoles[\"content_superadmin\"] = \"content_superadmin\";\n})(SystemRoles || (SystemRoles = {}));\n//# sourceMappingURL=project-values.js.map","/**\n * `SystemRoles` lives in `./project-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './project-values.js';\n/**\n * System interaction category enum.\n * Categories group one or more system interactions for default model assignment.\n */\nexport var SystemInteractionCategory;\n(function (SystemInteractionCategory) {\n SystemInteractionCategory[\"content_type\"] = \"content_type\";\n SystemInteractionCategory[\"intake\"] = \"intake\";\n SystemInteractionCategory[\"analysis\"] = \"analysis\";\n SystemInteractionCategory[\"agent\"] = \"agent\";\n SystemInteractionCategory[\"non_applicable\"] = \"non_applicable\";\n})(SystemInteractionCategory || (SystemInteractionCategory = {}));\n/**\n * Map system interaction endpoints to categories.\n */\nexport const SYSTEM_INTERACTION_CATEGORIES = {\n ExtractInformation: SystemInteractionCategory.intake,\n SelectDocumentType: SystemInteractionCategory.intake,\n GenerateMetadataModel: SystemInteractionCategory.content_type,\n ChunkDocument: SystemInteractionCategory.intake,\n IdentifyTextSections: SystemInteractionCategory.intake,\n AnalyzeDocument: SystemInteractionCategory.analysis,\n ReduceTextSections: SystemInteractionCategory.analysis,\n GenericAgent: SystemInteractionCategory.non_applicable,\n AdhocTaskAgent: SystemInteractionCategory.non_applicable,\n Mediator: SystemInteractionCategory.non_applicable,\n AnalyzeConversation: SystemInteractionCategory.analysis,\n GetAgentConversationTopic: SystemInteractionCategory.analysis,\n ContentSearchAgent: SystemInteractionCategory.analysis,\n ContentSearchReranker: SystemInteractionCategory.analysis,\n StudioAssistant: SystemInteractionCategory.agent,\n};\n// export interface ProjectConfigurationEmbeddings {\n// environment: string;\n// max_tokens: number;\n// dimensions: number;\n// model?: string;\n// }\nexport var SupportedEmbeddingTypes;\n(function (SupportedEmbeddingTypes) {\n SupportedEmbeddingTypes[\"text\"] = \"text\";\n SupportedEmbeddingTypes[\"image\"] = \"image\";\n SupportedEmbeddingTypes[\"properties\"] = \"properties\";\n})(SupportedEmbeddingTypes || (SupportedEmbeddingTypes = {}));\nvar FullTextType;\n(function (FullTextType) {\n FullTextType[\"full_text\"] = \"full_text\";\n})(FullTextType || (FullTextType = {}));\nexport const SearchTypes = {\n ...SupportedEmbeddingTypes,\n ...FullTextType,\n};\nexport const ProjectRefPopulate = 'id name account';\n/**\n * Supported languages for full-text search with their display names.\n * Maps ISO 639-1 codes to human-readable language names.\n */\nexport const SUPPORTED_SEARCH_LANGUAGES = {\n en: 'English',\n zh: 'Chinese',\n es: 'Spanish',\n hi: 'Hindi',\n ar: 'Arabic',\n pt: 'Portuguese',\n bn: 'Bengali',\n ru: 'Russian',\n ja: 'Japanese',\n de: 'German',\n fr: 'French',\n ko: 'Korean',\n it: 'Italian',\n tr: 'Turkish',\n vi: 'Vietnamese',\n pl: 'Polish',\n uk: 'Ukrainian',\n nl: 'Dutch',\n th: 'Thai',\n el: 'Greek',\n cs: 'Czech',\n sv: 'Swedish',\n ro: 'Romanian',\n hu: 'Hungarian',\n da: 'Danish',\n fi: 'Finnish',\n no: 'Norwegian',\n he: 'Hebrew',\n id: 'Indonesian',\n fa: 'Persian',\n};\n//# sourceMappingURL=project.js.map","export var PromptStatus;\n(function (PromptStatus) {\n PromptStatus[\"draft\"] = \"draft\";\n PromptStatus[\"published\"] = \"published\";\n PromptStatus[\"archived\"] = \"archived\";\n})(PromptStatus || (PromptStatus = {}));\nexport var PromptSegmentDefType;\n(function (PromptSegmentDefType) {\n PromptSegmentDefType[\"chat\"] = \"chat\";\n PromptSegmentDefType[\"template\"] = \"template\";\n})(PromptSegmentDefType || (PromptSegmentDefType = {}));\nexport var TemplateType;\n(function (TemplateType) {\n TemplateType[\"jst\"] = \"jst\";\n TemplateType[\"handlebars\"] = \"handlebars\";\n TemplateType[\"text\"] = \"text\";\n})(TemplateType || (TemplateType = {}));\n//# sourceMappingURL=prompt.js.map","export var ResolvableRefType;\n(function (ResolvableRefType) {\n ResolvableRefType[\"project\"] = \"Project\";\n ResolvableRefType[\"projects\"] = \"Projects\";\n ResolvableRefType[\"environment\"] = \"Environment\";\n ResolvableRefType[\"user\"] = \"User\";\n ResolvableRefType[\"account\"] = \"Account\";\n ResolvableRefType[\"interaction\"] = \"Interaction\";\n ResolvableRefType[\"userGroup\"] = \"UserGroup\";\n})(ResolvableRefType || (ResolvableRefType = {}));\n//# sourceMappingURL=refs.js.map","/**\n * Extraction schema filtering.\n *\n * Content-type object_schema properties may set `\"x-extract\": false` to mark fields\n * that must not be filled by extraction models (match scores, ERP ids filled later,\n * internal bookkeeping). The full schema remains the object model for UI/storage;\n * only the filtered copy is used as result_schema for constrained decoding.\n */\nconst X_EXTRACT = 'x-extract';\nfunction unescapeJsonPointerSegment(segment) {\n return segment.replace(/~1/g, '/').replace(/~0/g, '~');\n}\nfunction resolveLocalRef(ref, root) {\n if (!ref.startsWith('#/')) {\n return undefined;\n }\n let current = root;\n for (const segment of ref.slice(2).split('/').map(unescapeJsonPointerSegment)) {\n if (!current || typeof current !== 'object' || Array.isArray(current)) {\n return undefined;\n }\n current = current[segment];\n }\n return current;\n}\nfunction isExtractableSchemaNodeInternal(schema, root, seenRefs) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return true;\n }\n const schemaObj = schema;\n if (schemaObj[X_EXTRACT] === false) {\n return false;\n }\n if (typeof schemaObj.$ref === 'string' && !seenRefs.has(schemaObj.$ref)) {\n seenRefs.add(schemaObj.$ref);\n const resolved = resolveLocalRef(schemaObj.$ref, root);\n if (resolved !== undefined) {\n return isExtractableSchemaNodeInternal(resolved, root, seenRefs);\n }\n }\n return true;\n}\nexport function isExtractableSchemaNode(schema, root = schema) {\n return isExtractableSchemaNodeInternal(schema, root, new Set());\n}\nfunction filterSchemaArray(value, root) {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const filtered = value\n .map((item) => schemaForExtractionNode(item, root))\n .filter((item) => item !== undefined);\n return filtered.length > 0 ? filtered : undefined;\n}\nfunction filterSchemaMap(value, root) {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return undefined;\n }\n const filtered = {};\n for (const [key, child] of Object.entries(value)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n filtered[key] = childFiltered;\n }\n }\n return Object.keys(filtered).length > 0 ? filtered : undefined;\n}\nfunction schemaForExtractionNode(schema, root) {\n if (!schema || typeof schema !== 'object') {\n return schema;\n }\n if (Array.isArray(schema)) {\n return schema.map((item) => schemaForExtractionNode(item, root));\n }\n if (!isExtractableSchemaNode(schema, root)) {\n return undefined;\n }\n const node = { ...schema };\n for (const defsKey of ['$defs', 'definitions']) {\n const defs = filterSchemaMap(node[defsKey], root);\n if (defs) {\n node[defsKey] = defs;\n }\n else {\n delete node[defsKey];\n }\n }\n if (node.items && typeof node.items === 'object') {\n const items = schemaForExtractionNode(node.items, root);\n if (items !== undefined) {\n node.items = items;\n }\n else {\n delete node.items;\n }\n }\n for (const unionKey of ['anyOf', 'oneOf', 'allOf']) {\n if (Array.isArray(node[unionKey])) {\n const filtered = filterSchemaArray(node[unionKey], root);\n if (!filtered) {\n return undefined;\n }\n node[unionKey] = filtered;\n }\n }\n if (node.additionalProperties && typeof node.additionalProperties === 'object') {\n const additionalProperties = schemaForExtractionNode(node.additionalProperties, root);\n node.additionalProperties = additionalProperties ?? false;\n }\n if (node.properties && typeof node.properties === 'object' && !Array.isArray(node.properties)) {\n const props = {};\n for (const [key, child] of Object.entries(node.properties)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n props[key] = childFiltered;\n }\n }\n node.properties = props;\n if (Array.isArray(node.required)) {\n const kept = node.required.filter((r) => typeof r === 'string' && r in props);\n if (kept.length > 0) {\n node.required = kept;\n }\n else {\n delete node.required;\n }\n }\n }\n // Drop the flag from the extraction copy (not needed by providers)\n delete node[X_EXTRACT];\n return node;\n}\n/**\n * Deep-clones a JSON schema and removes properties (recursively) marked\n * `x-extract: false`, cleaning `required` arrays to match.\n */\nexport function schemaForExtraction(schema) {\n return (schemaForExtractionNode(schema, schema) ?? {});\n}\nfunction resolveSchemaNode(schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return schema;\n }\n const schemaObj = schema;\n if (typeof schemaObj.$ref !== 'string') {\n return schema;\n }\n return resolveLocalRef(schemaObj.$ref, root) ?? schema;\n}\nfunction mergePreservingNonExtractableNode(existing, extracted, schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return extracted;\n }\n const resolved = resolveSchemaNode(schema, root);\n if (!resolved || typeof resolved !== 'object' || Array.isArray(resolved)) {\n return extracted;\n }\n const schemaObj = resolved;\n // Arrays are new extraction output. Without a declared stable item key, index\n // merging can attach preserved ERP/match fields to the wrong row.\n if (Array.isArray(extracted)) {\n const itemSchema = schemaObj.items;\n if (!itemSchema || typeof itemSchema !== 'object') {\n return extracted;\n }\n return extracted.map((item) => mergePreservingNonExtractableNode(undefined, item, itemSchema, root));\n }\n if (!extracted || typeof extracted !== 'object' || Array.isArray(extracted)) {\n return extracted;\n }\n const props = schemaObj.properties;\n if (!props || typeof props !== 'object' || Array.isArray(props)) {\n return extracted;\n }\n const existingObj = existing && typeof existing === 'object' && !Array.isArray(existing)\n ? existing\n : {};\n const extractedObj = extracted;\n const propSchemas = props;\n const result = { ...extractedObj };\n for (const [key, propSchema] of Object.entries(propSchemas)) {\n if (!isExtractableSchemaNode(propSchema, root)) {\n // Model should not have filled this; restore prior value if any.\n if (key in existingObj) {\n result[key] = existingObj[key];\n }\n else {\n delete result[key];\n }\n continue;\n }\n if (key in extractedObj) {\n result[key] = mergePreservingNonExtractableNode(existingObj[key], extractedObj[key], propSchema, root);\n }\n }\n return result;\n}\n/**\n * Merge model output over existing properties while preserving values at paths\n * marked `x-extract: false` on the full (unfiltered) schema.\n */\nexport function mergePreservingNonExtractable(existing, extracted, schema) {\n return mergePreservingNonExtractableNode(existing, extracted, schema, schema);\n}\n//# sourceMappingURL=schema-for-extraction.js.map","export const AgentToolApprovalModes = ['ask', 'auto_review', 'full_control'];\nexport function normalizeAgentToolApprovalMode(mode, interactive) {\n if (interactive !== true) {\n return 'full_control';\n }\n return mode ?? 'full_control';\n}\n//# sourceMappingURL=agent-approval.js.map","export var CollectionStatus;\n(function (CollectionStatus) {\n CollectionStatus[\"active\"] = \"active\";\n CollectionStatus[\"archived\"] = \"archived\";\n})(CollectionStatus || (CollectionStatus = {}));\n//# sourceMappingURL=collections.js.map","/** Artifact key of the stored conversation catalog, relative to the agent storage root. */\nexport const CONVERSATION_CATALOG_ARTIFACT_KEY = 'catalog.json';\n//# sourceMappingURL=conversation-state.js.map","export function withDSLWorkflowSpecDiscriminator(spec) {\n if ('steps' in spec && spec.steps) {\n return { ...spec, spec_format: 'steps' };\n }\n return { ...spec, spec_format: 'activities' };\n}\nexport const WorkflowDefinitionRefPopulate = 'id name description tags created_at updated_at';\n//# sourceMappingURL=dsl-workflow.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeEditingPolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeEditingPolicySchema = {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n description: 'Agent interaction used for new document-editing sessions. Defaults to sys:GeneralAgent.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for collaborative document editing.',\n};\n//# sourceMappingURL=editing-policy-schema.generated.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeIntakePolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeIntakePolicySchema = {\n type: 'object',\n properties: {\n mode: {\n type: 'string',\n enum: ['programmatic', 'agentic'],\n description: 'Intake orchestration mode for this type.',\n },\n identification: {\n type: 'object',\n properties: {\n guidance: {\n type: 'string',\n },\n distinguish_from: {\n type: 'string',\n },\n examples: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n additionalProperties: false,\n description: 'Guidance used when selecting or creating this content type.',\n },\n locate: {\n type: 'object',\n properties: {\n instructions: {\n type: 'string',\n description: 'What to look for (\"commercial terms, payment schedule, signature pages\").',\n },\n detail: {\n type: 'number',\n enum: [8, 16],\n description: 'Pages per contact sheet: 8 = bigger tiles (headings readable). Default 16.',\n },\n min_pages: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n description: 'Only run when the page count is at least this. Default 8.',\n },\n },\n required: ['instructions'],\n additionalProperties: false,\n description: 'Document-map (\"locate\") pass: page thumbnails tiled into labeled contact sheets, one vision call returns which pages matter for THIS type. The result can scope conversion and extraction, and doubles as the vision planner for visual extraction.',\n },\n text_conversion: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n method: {\n type: 'string',\n enum: ['auto', 'basic', 'llm', 'custom'],\n },\n custom: {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n },\n agent: {\n type: 'string',\n },\n },\n additionalProperties: false,\n },\n instructions: {\n type: 'string',\n },\n output_format: {\n type: 'string',\n enum: ['markdown', 'text'],\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages to convert: everything or the locate result. Default all.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges to convert (wins over `scope` when set).',\n },\n render_dpi: {\n type: 'integer',\n minimum: 72,\n maximum: 2147483647,\n description: 'DPI at which each page is rendered to the image the LLM converts. Default 150 — the accuracy/cost sweet spot: higher resolutions balloon input tokens (some providers tile the page) for no quality gain, below ~150 dense tables start to misread. Raise only for very fine print.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the page-conversion interaction (method 'llm'/'auto' -> sys:ConvertPageToMarkdown, method 'custom' -> the custom interaction). Lets the visual conversion run on a cheaper/faster model (e.g. a flash model) than extraction. When unset, conversion uses the run's model config or the project default model.\",\n },\n },\n additionalProperties: false,\n description: 'Controls source-to-text conversion before extraction and embedding.',\n },\n extraction: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n source: {\n type: 'string',\n enum: ['auto', 'text', 'vision', 'mixed'],\n },\n instructions: {\n type: 'string',\n },\n interaction: {\n type: 'string',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the standard property-extraction interaction (sys:ExtractInformation). Lets extraction run on a different model/environment than the visual page conversion. When unset, extraction uses the run's model config or the project default model. (Grounded extraction is configured separately via grounding.config.)\",\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages extraction sees: everything or the locate result.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges extraction sees (wins over `scope` when set).',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on pages sent to extraction. Default 20.',\n },\n vision: {\n type: 'object',\n properties: {\n default_detail: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n allowed_details: {\n type: 'array',\n items: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n },\n max_image_tokens: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'PRIMARY budget: estimated image tokens per extraction call. Default 16000.',\n },\n max_payload_mb: {\n type: 'number',\n minimum: 1,\n description: 'Transport guard in megabytes. Default 16.',\n },\n max_pages_per_call: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on page images per extraction call. Default 8.',\n },\n },\n additionalProperties: false,\n description: 'Vision evidence budget for visual extraction. Detail names reference platform profiles; the type never defines dpi/quality/resolution.',\n },\n verification: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n model: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n materiality: {\n type: 'string',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n max_retries: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n },\n on_fail: {\n type: 'string',\n enum: ['flag', 'block'],\n },\n },\n additionalProperties: false,\n },\n grounding: {\n $ref: '#/$defs/ContentTypeExtractionGroundingPolicy',\n description: 'Controls PDF block-level citation grounding with annotated proof output.',\n },\n },\n additionalProperties: false,\n description: 'Controls schema-property extraction after type assignment.',\n },\n rendering_template: {\n type: 'string',\n description: 'Handlebars template used to materialize extracted properties into object text.',\n },\n embeddings: {\n $ref: '#/$defs/EmbeddingTypeEnabledMap',\n description: 'Per-type embedding switches. Unspecified values inherit the project policy.',\n },\n generate_toc: {\n type: 'boolean',\n description: 'Whether intake should generate a table of contents for matching documents.',\n },\n default_view: {\n type: 'string',\n enum: ['auto', 'text', 'pdf', 'image', 'properties'],\n description: 'Preferred first view for objects of this type.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for the standard intake workflows.',\n $defs: {\n AzureFoundryChatOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'azure-foundry-chat',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n seed: {\n type: 'number',\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockAI21Options: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-ai21',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n top_k: {\n type: 'number',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockCohereCommandOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-cohere-command',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockConverseOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-converse',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockGptOssOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-gpt-oss',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleChatCompletionsOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-chat-completions',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n reasoning_effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleResponsesOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-responses',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n reasoning_effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n verbosity: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMistralOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mistral',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockNovaOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockPalmyraOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-palmyra',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n min_tokens: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ConfigModes: {\n type: 'string',\n enum: ['RUN_AND_INTERACTION_CONFIG', 'RUN_CONFIG_ONLY', 'INTERACTION_CONFIG_ONLY'],\n },\n ContentTypeExtractionGroundingPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable PDF block-level citation grounding for property extraction.',\n },\n interaction: {\n type: 'string',\n description: 'Grounded extraction interaction. Defaults to the system grounded extractor.',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages to process.',\n },\n force_ocr: {\n type: 'boolean',\n description: 'Run OCR on every page even when a text layer exists.',\n },\n use_vision: {\n type: 'boolean',\n description: 'Attach instrumented page images to the grounded extraction prompt.',\n },\n raster_mode: {\n type: 'string',\n enum: ['vision', 'ocr'],\n description: \"How to read pages with no digital text layer (scans / image-only pages). 'vision' (default): read them off the page image and skip OCR. 'ocr': legacy path — OCR those pages and block-ground on the (lossy) OCR text.\",\n },\n grid_cell_pt: {\n type: 'number',\n minimum: 1,\n description: 'A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid (more cells, tighter boxes) but can trip weaker models into over-reading; tune per the model in `config`. Default 15.',\n },\n omit_block_boxes: {\n type: 'boolean',\n description: 'Drop block bounding boxes from the extraction prompt. Only sound with use_vision (layout comes from the image).',\n },\n window_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages per grounded extraction call before windowing.',\n },\n update_properties: {\n type: 'boolean',\n description: 'Update object properties with grounded extraction data. Default true.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the main grounded extraction interaction.',\n },\n hard_config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration used for hard-to-read content.',\n },\n hardness_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which hard_config is used. Default 0.5.',\n },\n min_citation_density: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Minimum citations-per-leaf-value ratio; completions below it retry with escalation. Default 0.3.',\n },\n refresh_ocr: {\n type: 'boolean',\n description: 'Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output).',\n },\n review: {\n $ref: '#/$defs/ContentTypeExtractionGroundingReviewPolicy',\n description: 'Optional post-extraction review pass.',\n },\n },\n additionalProperties: false,\n },\n ContentTypeExtractionGroundingReviewPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Set false to disable an inherited grounding review pass for this type.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the review interaction.',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which review runs. Defaults to hardness_threshold.',\n },\n coverage_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: \"Review also runs when any page's citation coverage falls below this floor (evidence of missed content). Default 0.2.\",\n },\n force: {\n type: 'boolean',\n description: 'Run review regardless of hardness.',\n },\n },\n additionalProperties: false,\n },\n EmbeddingTypeEnabledMap: {\n type: 'object',\n properties: {\n text: {\n type: 'boolean',\n },\n image: {\n type: 'boolean',\n },\n properties: {\n type: 'boolean',\n },\n },\n additionalProperties: false,\n },\n GroqOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'groq-deepseek-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_format: {\n type: 'string',\n enum: ['parsed', 'raw', 'hidden'],\n },\n },\n required: ['_option_id', 'reasoning_format'],\n additionalProperties: false,\n },\n HttpTimeoutOptions: {\n type: 'object',\n properties: {\n headersTimeout: {\n type: 'number',\n description: 'Time (ms) to wait for the first response byte after the request is sent.',\n },\n bodyTimeout: {\n type: 'number',\n description: 'Time (ms) between body chunks once streaming has started.',\n },\n connectTimeout: {\n type: 'number',\n description: 'TCP/TLS connect timeout (ms).',\n },\n keepAliveTimeout: {\n type: 'number',\n description: 'Idle socket reuse timeout (ms).',\n },\n },\n additionalProperties: false,\n description: \"HTTP timeouts applied to a driver's upstream LLM-provider calls.\\n\\nAll values are in milliseconds. Drivers should map these onto whatever HTTP client their SDK uses; the defaults applied in `@llumiverse/core/createDriverHttpAgent` are: - headersTimeout: 900_000 - bodyTimeout: 900_000 - connectTimeout: 60_000 - keepAliveTimeout: 300_000\\n\\nThe response defaults are deliberately longer than the hosting request boundary. Application-level cancellation should end user work first; driver timeouts are bounded-resource safety nets.\",\n },\n ImagenMaskMode: {\n type: 'string',\n enum: ['MASK_MODE_USER_PROVIDED', 'MASK_MODE_BACKGROUND', 'MASK_MODE_FOREGROUND', 'MASK_MODE_SEMANTIC'],\n },\n ImagenOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-imagen',\n },\n number_of_images: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n person_generation: {\n type: 'string',\n enum: ['dont_allow', 'allow_adults', 'allow_all'],\n },\n safety_setting: {\n type: 'string',\n enum: ['block_none', 'block_only_high', 'block_medium_and_above', 'block_low_and_above'],\n },\n image_file_type: {\n type: 'string',\n enum: ['image/jpeg', 'image/png'],\n },\n jpeg_compression_quality: {\n type: 'number',\n },\n aspect_ratio: {\n type: 'string',\n enum: ['1:1', '4:3', '3:4', '16:9', '9:16'],\n },\n add_watermark: {\n type: 'boolean',\n },\n enhance_prompt: {\n type: 'boolean',\n },\n edit_mode: {\n $ref: '#/$defs/ImagenTaskType',\n },\n guidance_scale: {\n type: 'number',\n },\n edit_steps: {\n type: 'number',\n },\n mask_mode: {\n $ref: '#/$defs/ImagenMaskMode',\n },\n mask_dilation: {\n type: 'number',\n },\n mask_class: {\n type: 'array',\n items: {\n type: 'number',\n },\n },\n controlType: {\n type: 'string',\n enum: ['CONTROL_TYPE_FACE_MESH', 'CONTROL_TYPE_CANNY', 'CONTROL_TYPE_SCRIBBLE'],\n },\n controlImageComputation: {\n type: 'boolean',\n },\n subjectType: {\n type: 'string',\n enum: [\n 'SUBJECT_TYPE_PERSON',\n 'SUBJECT_TYPE_ANIMAL',\n 'SUBJECT_TYPE_PRODUCT',\n 'SUBJECT_TYPE_DEFAULT',\n ],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ImagenTaskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'EDIT_MODE_INPAINT_REMOVAL',\n 'EDIT_MODE_INPAINT_INSERTION',\n 'EDIT_MODE_BGSWAP',\n 'EDIT_MODE_OUTPAINT',\n 'CUSTOMIZATION_SUBJECT',\n 'CUSTOMIZATION_STYLE',\n 'CUSTOMIZATION_CONTROLLED',\n 'CUSTOMIZATION_INSTRUCT',\n ],\n },\n IntakePageRanges: {\n type: 'array',\n items: {\n minItems: 2,\n maxItems: 2,\n type: 'array',\n items: {\n type: 'integer',\n minimum: -2147483648,\n maximum: 2147483647,\n },\n },\n description: 'Static page ranges: inclusive [start, end] pairs; negative indexes count from the end of the document ([[1, 2], [-1, -1]] = first two pages plus the last page).',\n },\n IntakePageScope: {\n type: 'string',\n enum: ['all', 'located'],\n description: 'Named page scope for intake conversion/extraction: everything or the locate-pass result. Static page ranges live in the sibling `page_ranges` field (which wins when set) — kept as a SEPARATE field because scalar-or-collection unions generate unstable API clients.',\n },\n IntakeVisionDetail: {\n type: 'string',\n enum: ['low', 'standard', 'high'],\n description: 'Vision detail level names referenced by intake policies. The rendering profiles behind the names (dpi, max size, quality, color mode) are PLATFORM-defined and project-overridable — a type only ever references a detail name.',\n },\n InteractionExecutionConfiguration: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n model: {\n type: 'string',\n },\n do_validate: {\n type: 'boolean',\n },\n run_data: {\n $ref: '#/$defs/RunDataStorageLevel',\n },\n configMode: {\n $ref: '#/$defs/ConfigModes',\n },\n model_options: {\n $ref: '#/$defs/ModelOptions',\n },\n prompt_cache_key: {\n type: 'string',\n description: 'Stable provider-side routing key for automatic prompt caching.',\n },\n prompt_cache_mode: {\n $ref: '#/$defs/PromptCacheMode',\n description: 'Controls provider-side explicit caching: auto falls back safely, off disables it, and required surfaces cache preparation failures for diagnostics.',\n },\n prompt_cache_ttl_seconds: {\n type: 'integer',\n minimum: 60,\n maximum: 9007199254740991,\n description: 'Caller-selected explicit cache lifetime in seconds. Defaults remain provider-specific; Vertex Gemini requires at least 60 seconds.',\n },\n prompt_cache_schema_suffix: {\n type: 'boolean',\n description: 'Put the result schema after the cached prefix; Vertesia still validates the returned JSON against it.',\n },\n http_timeout: {\n $ref: '#/$defs/HttpTimeoutOptions',\n description: 'Per-run HTTP timeouts for upstream LLM-provider calls.',\n },\n },\n additionalProperties: false,\n },\n MistralTextOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'mistral-text',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['none', 'high'],\n },\n random_seed: {\n type: 'integer',\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n },\n safe_prompt: {\n type: 'boolean',\n },\n parallel_tool_calls: {\n type: 'boolean',\n },\n tool_choice: {\n type: 'string',\n enum: ['auto', 'none', 'any', 'required'],\n },\n prompt_mode: {\n type: 'string',\n const: 'reasoning',\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ModelOptions: {\n oneOf: [\n {\n $ref: '#/$defs/TextFallbackOptions',\n },\n {\n $ref: '#/$defs/AzureFoundryChatOptions',\n },\n {\n $ref: '#/$defs/ImagenOptions',\n },\n {\n $ref: '#/$defs/VertexAIClaudeOptions',\n },\n {\n $ref: '#/$defs/VertexAIGeminiOptions',\n },\n {\n $ref: '#/$defs/VertexAIGeminiOmniVideoOptions',\n },\n {\n $ref: '#/$defs/VertexAIGrokOptions',\n },\n {\n $ref: '#/$defs/NovaCanvasOptions',\n },\n {\n $ref: '#/$defs/BedrockConverseOptions',\n },\n {\n $ref: '#/$defs/BedrockNovaOptions',\n },\n {\n $ref: '#/$defs/BedrockMistralOptions',\n },\n {\n $ref: '#/$defs/BedrockAI21Options',\n },\n {\n $ref: '#/$defs/BedrockCohereCommandOptions',\n },\n {\n $ref: '#/$defs/BedrockClaudeOptions',\n },\n {\n $ref: '#/$defs/BedrockPalmyraOptions',\n },\n {\n $ref: '#/$defs/BedrockGptOssOptions',\n },\n {\n $ref: '#/$defs/TwelvelabsPegasusOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleResponsesOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleChatCompletionsOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleClaudeOptions',\n },\n {\n $ref: '#/$defs/OpenAiThinkingOptions',\n },\n {\n $ref: '#/$defs/OpenAiTextOptions',\n },\n {\n $ref: '#/$defs/OpenAiDalleOptions',\n },\n {\n $ref: '#/$defs/OpenAiGptImageOptions',\n },\n {\n $ref: '#/$defs/XAIGrokImageOptions',\n },\n {\n $ref: '#/$defs/GroqOptions',\n },\n {\n $ref: '#/$defs/MistralTextOptions',\n },\n ],\n },\n NovaCanvasOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova-canvas',\n },\n taskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'TEXT_IMAGE_WITH_IMAGE_CONDITIONING',\n 'COLOR_GUIDED_GENERATION',\n 'IMAGE_VARIATION',\n 'INPAINTING',\n 'OUTPAINTING',\n 'BACKGROUND_REMOVAL',\n ],\n },\n width: {\n type: 'number',\n },\n height: {\n type: 'number',\n },\n quality: {\n type: 'string',\n enum: ['standard', 'premium'],\n },\n cfgScale: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n numberOfImages: {\n type: 'number',\n },\n controlMode: {\n type: 'string',\n enum: ['CANNY_EDGE', 'SEGMENTATION'],\n },\n controlStrength: {\n type: 'number',\n },\n colors: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n similarityStrength: {\n type: 'number',\n },\n outPaintingMode: {\n type: 'string',\n enum: ['DEFAULT', 'PRECISE'],\n },\n },\n required: ['_option_id', 'taskType'],\n additionalProperties: false,\n },\n OpenAiDalleOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-dalle',\n },\n size: {\n type: 'string',\n enum: ['256x256', '512x512', '1024x1024', '1792x1024', '1024x1792'],\n },\n image_quality: {\n type: 'string',\n enum: ['standard', 'hd'],\n },\n style: {\n type: 'string',\n enum: ['vivid', 'natural'],\n },\n response_format: {\n type: 'string',\n enum: ['url', 'b64_json'],\n },\n n: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiGptImageOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-gpt-image',\n },\n size: {\n type: 'string',\n enum: ['1024x1024', '1024x1536', '1536x1024', 'auto'],\n },\n image_quality: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'auto'],\n },\n background: {\n type: 'string',\n enum: ['transparent', 'opaque', 'auto'],\n },\n output_format: {\n type: 'string',\n enum: ['png', 'webp', 'jpeg'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiTextOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-text',\n },\n max_tokens: {\n type: 'number',\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n extra_body: {\n type: 'object',\n additionalProperties: true,\n description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiThinkingOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n extra_body: {\n type: 'object',\n additionalProperties: true,\n description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n PromptCacheMode: {\n type: 'string',\n enum: ['auto', 'off', 'required'],\n },\n ReasoningEffort: {\n type: 'string',\n enum: ['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'],\n },\n RunDataStorageLevel: {\n type: 'string',\n enum: ['STANDARD', 'RESTRICTED', 'DEBUG'],\n },\n TextFallbackOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'text-fallback',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ThinkingLevel: {\n type: 'string',\n enum: ['HIGH', 'MEDIUM', 'LOW', 'MINIMAL', 'THINKING_LEVEL_UNSPECIFIED'],\n },\n TwelvelabsPegasusOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-twelvelabs-pegasus',\n },\n temperature: {\n type: 'number',\n },\n max_tokens: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGeminiOmniVideoOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-gemini-omni-video',\n },\n task: {\n type: 'string',\n enum: ['text_to_video', 'image_to_video', 'reference_to_video', 'edit', 'extend'],\n },\n aspect_ratio: {\n type: 'string',\n enum: ['16:9', '9:16'],\n },\n duration_seconds: {\n type: 'integer',\n minimum: 3,\n maximum: 10,\n },\n resolution: {\n type: 'string',\n enum: ['360p', '720p', '1080p', '4k'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGeminiOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-gemini',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['minimal', 'low', 'medium', 'high'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n thinking_level: {\n $ref: '#/$defs/ThinkingLevel',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n flex: {\n type: 'boolean',\n deprecated: true,\n 'x-deprecated-message': 'Use service_tier=\"flex\" instead.',\n description: 'Deprecated: Use service_tier=\"flex\" instead.',\n },\n image_aspect_ratio: {\n type: 'string',\n enum: ['1:1', '2:3', '3:2', '3:4', '4:3', '9:16', '16:9', '21:9'],\n },\n image_size: {\n type: 'string',\n enum: ['1K', '2K', '4K'],\n },\n person_generation: {\n type: 'string',\n enum: ['ALLOW_ALL', 'ALLOW_ADULT', 'ALLOW_NONE'],\n },\n prominent_people: {\n type: 'string',\n enum: ['PROMINENT_PEOPLE_UNSPECIFIED', 'ALLOW_PROMINENT_PEOPLE', 'BLOCK_PROMINENT_PEOPLE'],\n },\n output_mime_type: {\n type: 'string',\n enum: ['image/png', 'image/jpeg'],\n },\n output_compression_quality: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGrokOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-grok',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n XAIGrokImageOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'xai-grok-image',\n },\n aspect_ratio: {\n type: 'string',\n enum: [\n '1:1',\n '16:9',\n '9:16',\n '4:3',\n '3:4',\n '3:2',\n '2:3',\n '2:1',\n '1:2',\n '19.5:9',\n '9:19.5',\n '20:9',\n '9:20',\n 'auto',\n ],\n },\n resolution: {\n type: 'string',\n enum: ['1k', '2k'],\n },\n quality: {\n type: 'string',\n enum: ['low', 'medium'],\n },\n response_format: {\n type: 'string',\n enum: ['url', 'b64_json'],\n },\n n: {\n type: 'integer',\n minimum: 1,\n maximum: 10,\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n },\n};\n//# sourceMappingURL=intake-policy-schema.generated.js.map","export const PROCESS_DEFINITION_FORMAT_VERSION = 1;\n//# sourceMappingURL=process.js.map","import { normalizeAgentResources } from '../interaction.js';\nexport var ContentEventName;\n(function (ContentEventName) {\n ContentEventName[\"create\"] = \"create\";\n ContentEventName[\"change_type\"] = \"change_type\";\n ContentEventName[\"update\"] = \"update\";\n ContentEventName[\"revision_created\"] = \"revision_created\";\n ContentEventName[\"delete\"] = \"delete\";\n ContentEventName[\"workflow_finished\"] = \"workflow_finished\";\n ContentEventName[\"workflow_execution_request\"] = \"workflow_execution_request\";\n ContentEventName[\"api_request\"] = \"api_request\";\n})(ContentEventName || (ContentEventName = {}));\nexport function getDocumentIds(payload) {\n // Check new input format first\n if (payload.input?.inputType === 'objectIds') {\n return payload.input.objectIds;\n }\n // Fall back to legacy objectIds field\n if (payload.objectIds) {\n return payload.objectIds;\n }\n return [];\n}\n// Task status enum for processed history\nexport var TaskStatus;\n(function (TaskStatus) {\n TaskStatus[\"SCHEDULED\"] = \"scheduled\";\n TaskStatus[\"RUNNING\"] = \"running\";\n TaskStatus[\"COMPLETED\"] = \"completed\";\n TaskStatus[\"FAILED\"] = \"failed\";\n TaskStatus[\"CANCELED\"] = \"canceled\";\n TaskStatus[\"TIMED_OUT\"] = \"timed_out\";\n TaskStatus[\"TERMINATED\"] = \"terminated\";\n TaskStatus[\"SENT\"] = \"sent\";\n TaskStatus[\"RECEIVED\"] = \"received\";\n})(TaskStatus || (TaskStatus = {}));\n// Task type enum\nexport var TaskType;\n(function (TaskType) {\n TaskType[\"ACTIVITY\"] = \"activity\";\n TaskType[\"CHILD_WORKFLOW\"] = \"childWorkflow\";\n TaskType[\"SIGNAL\"] = \"signal\";\n TaskType[\"TIMER\"] = \"timer\";\n})(TaskType || (TaskType = {}));\nexport const WorkflowExecutionStatusValues = {\n UNKNOWN: 0,\n RUNNING: 1,\n COMPLETED: 2,\n FAILED: 3,\n CANCELED: 4,\n TERMINATED: 5,\n CONTINUED_AS_NEW: 6,\n TIMED_OUT: 7,\n};\n// Keep numeric reverse lookup for existing callers without treating newer Temporal-only status\n// codes as part of Vertesia's published enum. Unknown numeric codes therefore read as undefined.\nexport const WorkflowExecutionStatus = {\n ...WorkflowExecutionStatusValues,\n 0: 'UNKNOWN',\n 1: 'RUNNING',\n 2: 'COMPLETED',\n 3: 'FAILED',\n 4: 'CANCELED',\n 5: 'TERMINATED',\n 6: 'CONTINUED_AS_NEW',\n 7: 'TIMED_OUT',\n};\nexport var AgentMessageType;\n(function (AgentMessageType) {\n AgentMessageType[AgentMessageType[\"SYSTEM\"] = 0] = \"SYSTEM\";\n AgentMessageType[AgentMessageType[\"THOUGHT\"] = 1] = \"THOUGHT\";\n AgentMessageType[AgentMessageType[\"PLAN\"] = 2] = \"PLAN\";\n AgentMessageType[AgentMessageType[\"UPDATE\"] = 3] = \"UPDATE\";\n AgentMessageType[AgentMessageType[\"COMPLETE\"] = 4] = \"COMPLETE\";\n AgentMessageType[AgentMessageType[\"WARNING\"] = 5] = \"WARNING\";\n AgentMessageType[AgentMessageType[\"ERROR\"] = 6] = \"ERROR\";\n AgentMessageType[AgentMessageType[\"ANSWER\"] = 7] = \"ANSWER\";\n AgentMessageType[AgentMessageType[\"QUESTION\"] = 8] = \"QUESTION\";\n AgentMessageType[AgentMessageType[\"REQUEST_INPUT\"] = 9] = \"REQUEST_INPUT\";\n AgentMessageType[AgentMessageType[\"IDLE\"] = 10] = \"IDLE\";\n AgentMessageType[AgentMessageType[\"TERMINATED\"] = 11] = \"TERMINATED\";\n AgentMessageType[AgentMessageType[\"STREAMING_CHUNK\"] = 12] = \"STREAMING_CHUNK\";\n AgentMessageType[AgentMessageType[\"BATCH_PROGRESS\"] = 13] = \"BATCH_PROGRESS\";\n AgentMessageType[AgentMessageType[\"RESTARTING\"] = 14] = \"RESTARTING\";\n})(AgentMessageType || (AgentMessageType = {}));\n// Type guards — check both message type and details shape for safety\nexport function isToolCallMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.THOUGHT &&\n !!details &&\n typeof details === 'object' &&\n typeof details.tool === 'string');\n}\n/** Extract the normalized resource references carried on a message's details, if any. */\nexport function getResourcesFromMessage(msg) {\n return normalizeAgentResources(msg.details?.resources);\n}\n// ============================================\n// TYPE GUARDS\n// ============================================\n/**\n * Check if a message is in compact format\n */\nexport function isCompactMessage(msg) {\n return typeof msg === 'object' && msg !== null && 't' in msg;\n}\n/**\n * Check if a message is in legacy format\n */\nexport function isLegacyMessage(msg) {\n return typeof msg === 'object' && msg !== null && 'type' in msg && !('t' in msg);\n}\n// ============================================\n// CONVERTERS\n// ============================================\n/**\n * Map old string enum values to AgentMessageType\n */\nconst STRING_TO_TYPE_MAP = {\n system: AgentMessageType.SYSTEM,\n thought: AgentMessageType.THOUGHT,\n plan: AgentMessageType.PLAN,\n update: AgentMessageType.UPDATE,\n complete: AgentMessageType.COMPLETE,\n warning: AgentMessageType.WARNING,\n error: AgentMessageType.ERROR,\n answer: AgentMessageType.ANSWER,\n question: AgentMessageType.QUESTION,\n request_input: AgentMessageType.REQUEST_INPUT,\n idle: AgentMessageType.IDLE,\n terminated: AgentMessageType.TERMINATED,\n streaming_chunk: AgentMessageType.STREAMING_CHUNK,\n batch_progress: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Map integer values to AgentMessageType (primary format)\n */\nconst INT_TO_TYPE_MAP = {\n 0: AgentMessageType.SYSTEM,\n 1: AgentMessageType.THOUGHT,\n 2: AgentMessageType.PLAN,\n 3: AgentMessageType.UPDATE,\n 4: AgentMessageType.COMPLETE,\n 5: AgentMessageType.WARNING,\n 6: AgentMessageType.ERROR,\n 7: AgentMessageType.ANSWER,\n 8: AgentMessageType.QUESTION,\n 9: AgentMessageType.REQUEST_INPUT,\n 10: AgentMessageType.IDLE,\n 11: AgentMessageType.TERMINATED,\n 12: AgentMessageType.STREAMING_CHUNK,\n 13: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Normalize message type from string or number to AgentMessageType\n */\nexport function normalizeMessageType(type) {\n // Handle integer type (current format and AgentMessageType enum values)\n if (typeof type === 'number') {\n return INT_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n // Handle string type (legacy messages from Redis with 90-day TTL)\n if (typeof type === 'string') {\n return STRING_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n return AgentMessageType.UPDATE;\n}\n/**\n * Convert legacy AgentMessage to CompactMessage\n */\nexport function toCompactMessage(legacy) {\n const compact = {\n t: normalizeMessageType(legacy.type),\n };\n if (legacy.message)\n compact.m = legacy.message;\n if (legacy.workstream_id && legacy.workstream_id !== 'main')\n compact.w = legacy.workstream_id;\n if (legacy.timestamp)\n compact.ts = legacy.timestamp;\n // Handle legacy streaming chunk details\n if (compact.t === AgentMessageType.STREAMING_CHUNK && legacy.details) {\n const d = legacy.details;\n if (d.is_final)\n compact.f = 1;\n // streaming_id and chunk_index are no longer needed\n }\n else if (legacy.details) {\n compact.d = legacy.details;\n }\n return compact;\n}\n/**\n * Parse any message format (compact or legacy) into CompactMessage.\n * Use this as the entry point for all received messages.\n */\nexport function parseMessage(data) {\n const parsed = typeof data === 'string' ? JSON.parse(data) : data;\n if (isCompactMessage(parsed))\n return parsed;\n if (isLegacyMessage(parsed))\n return toCompactMessage(parsed);\n throw new Error('Unknown message format');\n}\n/**\n * Create a compact message (convenience function for server-side)\n */\nexport function createCompactMessage(type, options = {}) {\n const compact = { t: type };\n if (options.message)\n compact.m = options.message;\n if (options.workstreamId && options.workstreamId !== 'main')\n compact.w = options.workstreamId;\n if (options.details)\n compact.d = options.details;\n if (options.isFinal)\n compact.f = 1;\n if (options.timestamp)\n compact.ts = options.timestamp;\n return compact;\n}\n/**\n * Convert CompactMessage back to AgentMessage (for UI components).\n * This allows UI to continue using familiar field names while wire format is compact.\n * @param compact The compact message to convert\n * @param workflowRunId Optional workflow_run_id (known from SSE context, not in compact format)\n */\nexport function toAgentMessage(compact, workflowRunId = '') {\n const message = {\n type: compact.t,\n timestamp: compact.ts || Date.now(),\n workflow_run_id: workflowRunId,\n message: compact.m || '',\n workstream_id: compact.w || 'main',\n };\n if (compact.d !== undefined && compact.d !== null)\n message.details = compact.d;\n // For streaming chunks, restore is_final and preserve an explicit streaming_id\n // when present. Older chunks fall back to workstream_id as their grouping key.\n if (compact.t === AgentMessageType.STREAMING_CHUNK) {\n const details = typeof compact.d === 'object' && compact.d !== null ? compact.d : {};\n const streamingId = typeof details.streaming_id === 'string' ? details.streaming_id : compact.w || 'main';\n const activityId = compact.i ?? (typeof details.activity_id === 'string' ? details.activity_id : undefined);\n message.details = {\n ...details,\n streaming_id: streamingId,\n is_final: compact.f === 1,\n ...(activityId ? { activity_id: activityId } : {}),\n };\n }\n return message;\n}\n/**\n * Status of a file being processed for conversation use.\n */\nexport var FileProcessingStatus;\n(function (FileProcessingStatus) {\n /** File is being uploaded to artifact storage */\n FileProcessingStatus[\"UPLOADING\"] = \"uploading\";\n /** File uploaded, text extraction in progress */\n FileProcessingStatus[\"PROCESSING\"] = \"processing\";\n /** File is ready for use in conversation */\n FileProcessingStatus[\"READY\"] = \"ready\";\n /** File processing failed */\n FileProcessingStatus[\"ERROR\"] = \"error\";\n})(FileProcessingStatus || (FileProcessingStatus = {}));\nexport const LOW_PRIORITY_TASK_QUEUE = 'low_priority';\n//# sourceMappingURL=workflow.js.map","/**\n * Rendering API types\n *\n * Types for rendering content to various formats (PDF, DOCX, images)\n */\nimport { WorkflowExecutionStatus } from './workflow.js';\nexport function getRenditionsPath(contentEtag, params) {\n return `renditions/${contentEtag}/${params.max_hw}`;\n}\nexport function isWorkflowTerminalStatus(status) {\n return (status === WorkflowExecutionStatus.COMPLETED ||\n status === WorkflowExecutionStatus.FAILED ||\n status === WorkflowExecutionStatus.CANCELED ||\n status === WorkflowExecutionStatus.TERMINATED ||\n status === WorkflowExecutionStatus.TIMED_OUT);\n}\n//# sourceMappingURL=rendering.js.map","/**\n * Agent Schedule Types\n *\n * Defines types for scheduling agents to run on a recurring basis using cron expressions.\n * Schedules are stored in MongoDB with execution handled by Temporal.\n */\n/**\n * Common cron expression presets for UI convenience.\n */\nexport const CRON_PRESETS = {\n EVERY_HOUR: '0 * * * *',\n EVERY_DAY_MIDNIGHT: '0 0 * * *',\n EVERY_DAY_9AM: '0 9 * * *',\n EVERY_MONDAY_MIDNIGHT: '0 0 * * MON',\n EVERY_WEEKDAY_9AM: '0 9 * * MON-FRI',\n FIRST_OF_MONTH: '0 0 1 * *',\n};\n/**\n * Human-readable descriptions for cron presets.\n */\nexport const CRON_PRESET_LABELS = {\n EVERY_HOUR: 'Every hour',\n EVERY_DAY_MIDNIGHT: 'Daily at midnight',\n EVERY_DAY_9AM: 'Daily at 9:00 AM',\n EVERY_MONDAY_MIDNIGHT: 'Every Monday at midnight',\n EVERY_WEEKDAY_9AM: 'Weekdays at 9:00 AM',\n FIRST_OF_MONTH: 'First day of month at midnight',\n};\n//# sourceMappingURL=schedule.js.map","export var ContentObjectApiHeaders;\n(function (ContentObjectApiHeaders) {\n ContentObjectApiHeaders[\"COLLECTION_ID\"] = \"x-collection-id\";\n ContentObjectApiHeaders[\"PROCESSING_PRIORITY\"] = \"x-processing-priority\";\n ContentObjectApiHeaders[\"CREATE_REVISION\"] = \"x-create-revision\";\n ContentObjectApiHeaders[\"REVISION_LABEL\"] = \"x-revision-label\";\n /**\n * @deprecated Events are now always emitted. This suppresses the Temporal-backed delivery targets (workflow, agent, and process) — webhook deliveries still fire.\n */\n ContentObjectApiHeaders[\"SUPPRESS_WORKFLOWS\"] = \"x-suppress-workflows\";\n})(ContentObjectApiHeaders || (ContentObjectApiHeaders = {}));\n/**\n * Headers for Data Store API calls.\n * Used for Cloud Run session affinity to route requests to the same instance.\n */\nexport var DataStoreApiHeaders;\n(function (DataStoreApiHeaders) {\n /** Data store ID for session affinity - routes requests for same store to same instance */\n DataStoreApiHeaders[\"DATA_STORE_ID\"] = \"x-data-store-id\";\n})(DataStoreApiHeaders || (DataStoreApiHeaders = {}));\nexport var ContentObjectStatus;\n(function (ContentObjectStatus) {\n ContentObjectStatus[\"created\"] = \"created\";\n ContentObjectStatus[\"processing\"] = \"processing\";\n ContentObjectStatus[\"ready\"] = \"ready\";\n ContentObjectStatus[\"completed\"] = \"completed\";\n ContentObjectStatus[\"failed\"] = \"failed\";\n ContentObjectStatus[\"archived\"] = \"archived\";\n})(ContentObjectStatus || (ContentObjectStatus = {}));\nexport var ContentNature;\n(function (ContentNature) {\n ContentNature[\"Video\"] = \"video\";\n ContentNature[\"Image\"] = \"image\";\n ContentNature[\"Audio\"] = \"audio\";\n ContentNature[\"Document\"] = \"document\";\n ContentNature[\"Code\"] = \"code\";\n ContentNature[\"Other\"] = \"other\";\n})(ContentNature || (ContentNature = {}));\nexport const POSTER_RENDITION_NAME = 'Poster';\nexport const AUDIO_RENDITION_NAME = 'Audio';\nexport const WEB_VIDEO_RENDITION_NAME = 'Web';\nexport const PDF_RENDITION_NAME = 'PDF';\nexport function getContentTypeRefId(type) {\n return type.id;\n}\nexport var WorkflowRuleInputType;\n(function (WorkflowRuleInputType) {\n WorkflowRuleInputType[\"single\"] = \"single\";\n WorkflowRuleInputType[\"multiple\"] = \"multiple\";\n WorkflowRuleInputType[\"none\"] = \"none\";\n})(WorkflowRuleInputType || (WorkflowRuleInputType = {}));\nexport var ImageRenditionFormat;\n(function (ImageRenditionFormat) {\n ImageRenditionFormat[\"jpeg\"] = \"jpeg\";\n ImageRenditionFormat[\"png\"] = \"png\";\n ImageRenditionFormat[\"webp\"] = \"webp\";\n})(ImageRenditionFormat || (ImageRenditionFormat = {}));\nexport const MarkdownRenditionFormat = {\n docx: 'docx',\n pdf: 'pdf',\n};\n/**\n * Matrix of supported content type → format conversions.\n * This is the authoritative source of truth for what renditions can be generated.\n *\n * Key patterns:\n * - Exact MIME types (e.g., 'application/pdf')\n * - Wildcard patterns (e.g., 'image/*', 'video/*')\n */\nconst RENDITION_COMPATIBILITY = {\n // Image formats can generate: jpeg, png, webp\n 'image/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Video formats can generate: jpeg, png (thumbnails)\n 'video/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png],\n // PDF can generate: jpeg, png, webp (page images)\n 'application/pdf': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Markdown can generate: pdf, docx (NOT jpeg/png)\n 'text/markdown': [MarkdownRenditionFormat.pdf, MarkdownRenditionFormat.docx],\n // Any text/* can generate: docx (editable export)\n 'text/*': [MarkdownRenditionFormat.docx],\n // Office documents can generate: pdf\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [MarkdownRenditionFormat.pdf],\n 'application/msword': [MarkdownRenditionFormat.pdf],\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': [MarkdownRenditionFormat.pdf],\n 'application/vnd.ms-powerpoint': [MarkdownRenditionFormat.pdf],\n};\n/**\n * Check if a specific rendition format can be generated from a content type.\n *\n * @param contentType - The MIME type of the source content (e.g., 'image/png', 'text/markdown')\n * @param format - The desired rendition format (e.g., ImageRenditionFormat.jpeg)\n * @returns true if the format can be generated from the content type\n *\n * @example\n * canGenerateRendition('image/png', ImageRenditionFormat.jpeg) // true\n * canGenerateRendition('text/markdown', ImageRenditionFormat.jpeg) // false\n * canGenerateRendition('text/markdown', MarkdownRenditionFormat.pdf) // true\n */\nexport function canGenerateRendition(contentType, format) {\n if (!contentType)\n return false;\n const formatStr = typeof format === 'string' ? format : format;\n // Check exact match first\n const exactMatch = RENDITION_COMPATIBILITY[contentType];\n if (exactMatch?.some((f) => f === formatStr)) {\n return true;\n }\n // Check wildcard patterns (e.g., 'image/*', 'video/*')\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch?.some((f) => f === formatStr)) {\n return true;\n }\n return false;\n}\nexport var ContentObjectProcessingPriority;\n(function (ContentObjectProcessingPriority) {\n ContentObjectProcessingPriority[\"normal\"] = \"normal\";\n ContentObjectProcessingPriority[\"low\"] = \"low\";\n})(ContentObjectProcessingPriority || (ContentObjectProcessingPriority = {}));\n/**\n * Get the list of rendition formats supported for a given content type.\n *\n * @param contentType - The MIME type of the source content\n * @returns Array of supported rendition formats, or empty array if none\n *\n * @example\n * getSupportedRenditionFormats('image/png') // [jpeg, png, webp]\n * getSupportedRenditionFormats('text/markdown') // [pdf, docx]\n * getSupportedRenditionFormats('text/html') // []\n */\nexport function getSupportedRenditionFormats(contentType) {\n if (!contentType)\n return [];\n // Check exact match first\n if (RENDITION_COMPATIBILITY[contentType]) {\n return [...RENDITION_COMPATIBILITY[contentType]];\n }\n // Check wildcard patterns\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch) {\n return [...wildcardMatch];\n }\n return [];\n}\n/**\n * Check if a content type supports visual (image) renditions.\n * This is useful for determining if a document can have thumbnails/previews.\n *\n * @param contentType - The MIME type of the source content\n * @returns true if the content type can generate JPEG renditions\n *\n * @example\n * supportsVisualRendition('image/png') // true\n * supportsVisualRendition('application/pdf') // true\n * supportsVisualRendition('text/markdown') // false\n */\nexport function supportsVisualRendition(contentType) {\n return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);\n}\n//# sourceMappingURL=store.js.map","export const REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE = 'requested_scope_unavailable';\nexport const NO_ACCESSIBLE_ACCOUNT_ERROR_CODE = 'no_accessible_account';\nexport const RESTRICTED_ENVIRONMENT_ERROR_CODE = 'restricted_environment';\nexport const TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE = 'token_issuance_forbidden';\nexport const ISSUE_TOKEN_FORBIDDEN_ERROR_CODES = [\n REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE,\n NO_ACCESSIBLE_ACCOUNT_ERROR_CODE,\n RESTRICTED_ENVIRONMENT_ERROR_CODE,\n TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE,\n];\n//# sourceMappingURL=sts-errors.js.map","export var TrainingSessionStatus;\n(function (TrainingSessionStatus) {\n TrainingSessionStatus[\"created\"] = \"created\";\n TrainingSessionStatus[\"building\"] = \"building\";\n TrainingSessionStatus[\"prepared\"] = \"prepared\";\n TrainingSessionStatus[\"processing\"] = \"processing\";\n TrainingSessionStatus[\"completed\"] = \"completed\";\n TrainingSessionStatus[\"cancelled\"] = \"cancelled\";\n TrainingSessionStatus[\"failed\"] = \"failed\";\n})(TrainingSessionStatus || (TrainingSessionStatus = {}));\n//# sourceMappingURL=training.js.map","/**\n * Transient-token values that exist at runtime.\n *\n * Split out of `transient-tokens.ts` so `api-schemas/invites.ts` can read the enum without importing\n * a module that derives its types from those very schemas. Re-exported from `transient-tokens.ts`.\n */\nexport var TransientTokenType;\n(function (TransientTokenType) {\n TransientTokenType[\"userInvite\"] = \"user-invite\";\n TransientTokenType[\"migration\"] = \"migration\";\n})(TransientTokenType || (TransientTokenType = {}));\n//# sourceMappingURL=transient-tokens-values.js.map","/**\n * Account values that exist at runtime — enums, constants, and the pure helpers over them.\n *\n * Split out of `user.ts` so the dependency direction can run one way. The API schemas need these\n * values (`z.enum(BillingMethod)`, `.max(ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH)`), and `user.ts`\n * needs the types the schemas infer. Both living in `user.ts` would make it import from a module\n * that imports it back; here, `user.ts` and `api-schemas/account.ts` both depend on this module and\n * nothing depends on them.\n *\n * Everything here is re-exported from `user.ts`, so existing import paths keep working — this is a\n * move, not a rename.\n */\nexport var Datacenters;\n(function (Datacenters) {\n Datacenters[\"aws\"] = \"aws\";\n Datacenters[\"gcp\"] = \"gcp\";\n Datacenters[\"azure\"] = \"azure\";\n})(Datacenters || (Datacenters = {}));\nexport var BillingMethod;\n(function (BillingMethod) {\n BillingMethod[\"stripe\"] = \"stripe\";\n BillingMethod[\"invoice\"] = \"invoice\";\n})(BillingMethod || (BillingMethod = {}));\nexport var AccountType;\n(function (AccountType) {\n AccountType[\"vertesia\"] = \"vertesia\";\n AccountType[\"partner\"] = \"partner\";\n AccountType[\"free\"] = \"free\";\n AccountType[\"customer\"] = \"customer\";\n AccountType[\"prospect\"] = \"prospect\";\n AccountType[\"unknown\"] = \"unknown\";\n})(AccountType || (AccountType = {}));\n/**\n * Quota/rate-limit tier assigned to an account. Code-defined tiers live in `@dglabs/quota`\n * (`QUOTA_TIERS`); these names must match its keys.\n * - `standard` — protective baseline limits (the default for most accounts).\n * - `enterprise` — high limits for contracted customers / internal / partners.\n *\n * An account with no explicit `quota_tier` derives its tier from its `account_type`.\n */\nexport var QuotaTier;\n(function (QuotaTier) {\n QuotaTier[\"standard\"] = \"standard\";\n QuotaTier[\"enterprise\"] = \"enterprise\";\n})(QuotaTier || (QuotaTier = {}));\nexport const ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH = 1000;\n//# sourceMappingURL=account-values.js.map","export * from './account-values.js';\nexport const UserRefPopulate = 'id name email picture';\n/**\n * Annotation marker (stored in {@link User.annotations}) that grants a user access to\n * non-production environments (`preview`, `preprod`). See\n * `docs/restrict-access-to-non-production-envs.md`.\n */\nexport const EARLY_ACCESS_ANNOTATION = 'early-access';\n/**\n * Business error code returned by the STS (token server) when a user is denied access to a\n * restricted (`preview`/`preprod`) environment because they lack the {@link EARLY_ACCESS_ANNOTATION}\n * annotation. The UI keys its dedicated rejection screen off this code.\n */\nexport { RESTRICTED_ENVIRONMENT_ERROR_CODE } from './sts-errors.js';\nexport const AccountRefPopulate = 'id name';\n//# sourceMappingURL=user.js.map","export function getTenantId(accountId, projectId) {\n //use the last 6 characters of the accountId as the db name\n //as in mongo the last 6 char are an incrementing counter\n const accountLast6 = accountId.slice(-6);\n const projectLast6 = projectId.slice(-6);\n return `${accountLast6}_${projectLast6}`;\n}\nexport function getTenantIdFromProject(project) {\n return getTenantId(project.account, project.id);\n}\n//# sourceMappingURL=auth.js.map","export function mergeInCodePromptSchemas(prompts) {\n const props = {};\n const required = new Set();\n for (const prompt of prompts) {\n if (prompt.schema?.properties) {\n const schema = prompt.schema;\n if (schema.required) {\n for (const prop of schema.required) {\n required.add(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n }\n const schema = Object.keys(props).length > 0\n ? {\n properties: props,\n required: Array.from(required),\n }\n : null;\n return schema;\n}\n//# sourceMappingURL=schemas.js.map","/**\n * The header a caller names an API version in, as `YYYYMMDD` — see {@link ApiVersions}.\n *\n * Declared here rather than in the client, because both ends of the negotiation need it: the\n * servers register it with `withVersionHeader` and read it when deciding how strictly to hold a\n * request to its published schema, and `@vertesia/client` sets it on every call. It kept the\n * spelling it has always had on the wire.\n */\nexport const VERSION_HEADER = 'x-api-version';\nexport var ApiVersions;\n(function (ApiVersions) {\n ApiVersions[ApiVersions[\"COMPLETION_RESULT_V1\"] = 20250925] = \"COMPLETION_RESULT_V1\";\n ApiVersions[ApiVersions[\"DOWNLOAD_URL_NO_MIME_TYPE_V1\"] = 20260210] = \"DOWNLOAD_URL_NO_MIME_TYPE_V1\";\n ApiVersions[ApiVersions[\"MEDIA_BLOB_STORAGE_V1\"] = 20260319] = \"MEDIA_BLOB_STORAGE_V1\";\n /**\n * Request bodies and parameters are rejected when they do not match the published component.\n *\n * The endpoints did not change shape at this date — the schemas they had always published\n * started being enforced. A body carrying an undeclared property against a closed component,\n * or a query parameter of the wrong type, used to be accepted and silently ignored; from here\n * it is a 400.\n *\n * Unlike the milestones above, this one is not about a route: it gates the enforcement policy\n * itself, so a caller pinned below it gets the old lenient behaviour on EVERY endpoint while\n * the mismatch is logged. Sending nothing means the current API, so the strict reading is what\n * a new caller gets by default and leniency has to be asked for.\n */\n ApiVersions[ApiVersions[\"REQUEST_CONTRACT_ENFORCEMENT_V1\"] = 20260803] = \"REQUEST_CONTRACT_ENFORCEMENT_V1\";\n})(ApiVersions || (ApiVersions = {}));\n/**\n * The API version used by current clients and published as the current OpenAPI shape.\n *\n * Keep this explicit rather than deriving it at runtime: promoting a milestone to the client\n * default is a deliberate compatibility decision. The versions test ensures this alias is\n * reconsidered whenever a newer milestone is added.\n */\nexport const CURRENT_API_VERSION = ApiVersions.REQUEST_CONTRACT_ENFORCEMENT_V1;\n/** The current API version formatted for the {@link VERSION_HEADER} wire value. */\nexport const CURRENT_API_VERSION_HEADER_VALUE = String(CURRENT_API_VERSION);\n//# sourceMappingURL=versions.js.map","export const VIEW_EXPERIENCE_SCHEMA_VERSION = 1;\n/** Build the generic reusable client route for a persisted, system, or app-contributed View. */\nexport function viewExperienceRoute(id) {\n return `/view/${encodeURIComponent(id)}`;\n}\nexport const VIEW_SEARCH_FIELD_TYPES = ['text', 'keyword', 'number', 'date', 'boolean'];\nexport const VIEW_AGENTIC_SEARCH_MODES = ['query', 'query_and_view'];\nexport const VIEW_RESULT_FIELD_FORMATS = [\n 'text',\n 'date',\n 'number',\n 'badge',\n 'user',\n 'content_type',\n 'location',\n];\nexport const VIEW_SELECTION_MODES = ['single', 'multiple'];\nexport const VIEW_ACTION_PLACEMENTS = ['toolbar', 'row', 'selection'];\nexport const VIEW_ACTION_SELECTION_REQUIREMENTS = ['none', 'single', 'multiple', 'any'];\n//# sourceMappingURL=views.js.map","/**\n * Agent Observability Telemetry Types\n *\n * These types define the event-based model for agent observability.\n */\n// ============================================================================\n// Enums\n// ============================================================================\n/**\n * Types of telemetry events\n */\nexport var AgentEventType;\n(function (AgentEventType) {\n AgentEventType[\"AgentRunStarted\"] = \"agent_run_started\";\n AgentEventType[\"AgentRunCompleted\"] = \"agent_run_completed\";\n AgentEventType[\"LlmCall\"] = \"llm_call\";\n AgentEventType[\"ToolCall\"] = \"tool_call\";\n})(AgentEventType || (AgentEventType = {}));\n/**\n * Types of LLM calls in a conversation\n */\nexport var LlmCallType;\n(function (LlmCallType) {\n /** Initial conversation start */\n LlmCallType[\"Start\"] = \"start\";\n /** Resuming with tool results */\n LlmCallType[\"ResumeTools\"] = \"resume_tools\";\n /** Resuming with user message */\n LlmCallType[\"ResumeUser\"] = \"resume_user\";\n /** Checkpoint resume (after conversation summarization) */\n LlmCallType[\"Checkpoint\"] = \"checkpoint\";\n /** Nested interaction call from within tools */\n LlmCallType[\"NestedInteraction\"] = \"nested_interaction\";\n})(LlmCallType || (LlmCallType = {}));\n/**\n * Types of tools that can be called\n */\nexport var TelemetryToolType;\n(function (TelemetryToolType) {\n /** Built-in tools (e.g., plan, search) */\n TelemetryToolType[\"Builtin\"] = \"builtin\";\n /** Interaction-based tools */\n TelemetryToolType[\"Interaction\"] = \"interaction\";\n /** Remote/MCP tools */\n TelemetryToolType[\"Remote\"] = \"remote\";\n /** Skill tools */\n TelemetryToolType[\"Skill\"] = \"skill\";\n})(TelemetryToolType || (TelemetryToolType = {}));\n//# sourceMappingURL=workflow-analytics.js.map"],"mappings":"AAYA,IAAW,GACV,SAAU,EAAY,CACnB,EAAW,SAAc,mBACzB,EAAW,UAAe,oBAC1B,EAAW,WAAgB,qBAC3B,EAAW,YAAiB,sBAC5B,EAAW,SAAc,WACzB,EAAW,UAAe,YAC1B,EAAW,UAAe,oBAC1B,EAAW,WAAgB,aAC3B,EAAW,cAAmB,gBAC9B,EAAW,yBAA8B,2BACzC,EAAW,uBAA4B,yBACvC,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,oBAAyB,sBACpC,EAAW,eAAoB,iBAC/B,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,cAAmB,gBAC9B,EAAW,cAAmB,gBAC9B,EAAW,eAAoB,kBAE/B,EAAW,aAAkB,eAE7B,EAAW,WAAgB,aAC3B,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,iBAAsB,mBACjC,EAAW,cAAmB,gBAC9B,EAAW,eAAoB,iBAC/B,EAAW,cAAmB,gBAC9B,EAAW,mBAAwB,qBACnC,EAAW,cAAmB,gBAC9B,EAAW,aAAkB,eAC7B,EAAW,eAAoB,iBAC/B,EAAW,oBAAyB,sBACpC,EAAW,eAAoB,iBAC/B,EAAW,UAAe,YAC1B,EAAW,YAAiB,cAC5B,EAAW,gBAAqB,kBAEhC,EAAW,cAAmB,eAClC,EAAA,CAAG,AAAe,IAAa,CAAC,CAAE,EAClC,IAAW,GACV,SAAU,EAA2B,CAClC,EAA0B,QAAa,UACvC,EAA0B,YAAiB,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qBAAsB,EAC1B,EACA,UAAW,CACP,KAAM,+CACN,YAAa,0EACjB,CACJ,EACA,qBAAsB,GACtB,YAAa,4DACjB,EACA,mBAAoB,CAChB,KAAM,SACN,YAAa,gFACjB,EACA,WAAY,CACR,KAAM,kCACN,YAAa,6EACjB,EACA,aAAc,CACV,KAAM,UACN,YAAa,4EACjB,EACA,aAAc,CACV,KAAM,SACN,KAAM,CAAC,OAAQ,OAAQ,MAAO,QAAS,YAAY,EACnD,YAAa,gDACjB,CACJ,EACA,qBAAsB,GACtB,YAAa,6DACb,MAAO,CACH,wBAAyB,CACrB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,oBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,KAAM,CACF,KAAM,QACV,EACA,aAAc,CACV,KAAM,SACN,KAAM,CAAC,MAAO,OAAQ,MAAM,CAChC,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,mBAAoB,CAChB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,cACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,qBAAsB,CAClB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,gBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,uBAAwB,CACpB,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,SACV,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,OAAQ,QAAS,KAAK,CAClD,EACA,cAAe,CACX,KAAM,SACV,EACA,UAAW,CACP,KAAM,SACN,KAAM,CAAC,KAAM,IAAI,CACrB,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,4BAA6B,CACzB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,wBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,uBAAwB,CACpB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,kBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,qBAAsB,CAClB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,Y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AM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,WAAY,CACR,KAAM,QACV,EACA,KAAM,CACF,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,6BAA8B,kBAAmB,yBAAyB,CACrF,EACA,qCAAsC,CAClC,KAAM,SACN,WAAY,CACR,QAAS,CACL,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,YAAa,6EACjB,EACA,UAAW,CACP,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,2BACjB,EACA,UAAW,CACP,KAAM,UACN,YAAa,sDACjB,EACA,WAAY,CACR,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,SAAU,KAAK,EACtB,YAAa,wNACjB,EACA,aAAc,CACV,KAAM,SACN,QAAS,EACT,YAAa,qMACjB,EACA,iBAAkB,CACd,KAAM,UACN,YAAa,iHACjB,EACA,aAAc,CACV,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,8DACjB,EACA,kBAAmB,CACf,KAAM,UACN,YAAa,uEACjB,EACA,OAAQ,CACJ,KAAM,4CACN,YAAa,6EACjB,EACA,YAAa,CACT,KAAM,4CACN,YAAa,8DACjB,EACA,mBAAoB,CAChB,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,oEACjB,EACA,qBAAsB,CAClB,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,kGACjB,EACA,YAAa,CACT,KAAM,UACN,Y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,EACA,mBAAoB,CAChB,KAAM,SACN,KAAM,CAAC,MAAO,WAAY,MAAM,EAChC,YAAa,iOACjB,EACA,kCAAmC,CAC/B,KAAM,SACN,WAAY,CACR,GAAI,CACA,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,YAAa,CACT,KAAM,SACV,EACA,SAAU,CACN,KAAM,6BACV,EACA,WAAY,CACR,KAAM,qBACV,EACA,cAAe,CACX,KAAM,sBACV,EACA,iBAAkB,CACd,KAAM,SACN,YAAa,gEACjB,EACA,kBAAmB,CACf,KAAM,0BACN,YAAa,qJACjB,EACA,yBAA0B,CACtB,KAAM,UACN,QAAS,GACT,QAAS,iBACT,YAAa,oIACjB,EACA,2BAA4B,CACxB,KAAM,UACN,YAAa,uGACjB,EACA,aAAc,CACV,KAAM,6BACN,YAAa,wDACjB,CACJ,EACA,qBAAsB,EAC1B,EACA,mBAAoB,CAChB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,cACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,OAAQ,MAAM,CACzB,EACA,YAAa,CACT,KAAM,UACN,QAAS,kBACT,QAAS,gBACb,EACA,YAAa,CACT,KAAM,SACV,EACA,oBAAqB,CACjB,KAAM,SACV,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,OAAQ,OAAQ,MAAO,UAAU,CAC5C,EACA,YAAa,CACT,KAAM,SACN,MAAO,WACX,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,aAAc,CACV,MAAO,CACH,CACI,KAAM,6BACV,EACA,CACI,KAAM,iCACV,EACA,CACI,KAAM,uBACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,wCACV,EACA,CACI,KAAM,6BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,gCACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,qCACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,kCACV,EACA,CACI,KAAM,uCACV,EACA,CACI,KAAM,6CACV,EACA,CACI,KAAM,oCACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,6BACV,EACA,CACI,KAAM,qBACV,EACA,CACI,KAAM,4BACV,CACJ,CACJ,EACA,kBAAmB,CACf,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,qBACX,EACA,SAAU,CACN,KAAM,SACN,KAAM,CACF,aACA,qCACA,0BACA,kBACA,aACA,cACA,oBACJ,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,OAAQ,CACJ,KAAM,QACV,EACA,QAAS,CACL,KAAM,SACN,KAAM,CAAC,WAAY,SAAS,CAChC,EACA,SAAU,CACN,KAAM,QACV,EACA,KAAM,CACF,KAAM,QACV,EACA,eAAgB,CACZ,KAAM,QACV,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,aAAc,cAAc,CACvC,EACA,gBAAiB,CACb,KAAM,QACV,EACA,OAAQ,CACJ,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,mBAAoB,CAChB,KAAM,QACV,EACA,gBAAiB,CACb,KAAM,SACN,KAAM,CAAC,UAAW,SAAS,CAC/B,CACJ,EACA,SAAU,CAAC,aAAc,UAAU,EACnC,qBAAsB,EAC1B,EACA,mBAAoB,CACh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