@agentproto/model-catalog 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -0
  3. package/dist/access/index.d.ts +30 -0
  4. package/dist/access/index.mjs +4 -0
  5. package/dist/access/index.mjs.map +1 -0
  6. package/dist/audio/index.d.ts +84 -0
  7. package/dist/audio/index.mjs +3 -0
  8. package/dist/audio/index.mjs.map +1 -0
  9. package/dist/audio-BzVF_wke.d.ts +92 -0
  10. package/dist/base-BNHcMifc.d.ts +109 -0
  11. package/dist/byok/index.d.ts +33 -0
  12. package/dist/byok/index.mjs +3 -0
  13. package/dist/byok/index.mjs.map +1 -0
  14. package/dist/catalog-aQHd559b.d.ts +594 -0
  15. package/dist/chunk-2LWYZOWB.mjs +643 -0
  16. package/dist/chunk-2LWYZOWB.mjs.map +1 -0
  17. package/dist/chunk-CINXNTU3.mjs +134 -0
  18. package/dist/chunk-CINXNTU3.mjs.map +1 -0
  19. package/dist/chunk-F7OEHYUI.mjs +187 -0
  20. package/dist/chunk-F7OEHYUI.mjs.map +1 -0
  21. package/dist/chunk-GH7PB5FB.mjs +183 -0
  22. package/dist/chunk-GH7PB5FB.mjs.map +1 -0
  23. package/dist/chunk-H6JUTF3U.mjs +33 -0
  24. package/dist/chunk-H6JUTF3U.mjs.map +1 -0
  25. package/dist/chunk-HEDDSOZF.mjs +47 -0
  26. package/dist/chunk-HEDDSOZF.mjs.map +1 -0
  27. package/dist/chunk-HRRG2RZO.mjs +116 -0
  28. package/dist/chunk-HRRG2RZO.mjs.map +1 -0
  29. package/dist/chunk-IJZ4XPO2.mjs +606 -0
  30. package/dist/chunk-IJZ4XPO2.mjs.map +1 -0
  31. package/dist/chunk-IORIAFK2.mjs +227 -0
  32. package/dist/chunk-IORIAFK2.mjs.map +1 -0
  33. package/dist/chunk-OHAMH3ZE.mjs +2629 -0
  34. package/dist/chunk-OHAMH3ZE.mjs.map +1 -0
  35. package/dist/chunk-QHELXPSL.mjs +85 -0
  36. package/dist/chunk-QHELXPSL.mjs.map +1 -0
  37. package/dist/chunk-SGJR6ZQH.mjs +1230 -0
  38. package/dist/chunk-SGJR6ZQH.mjs.map +1 -0
  39. package/dist/chunk-WRUWNKDB.mjs +521 -0
  40. package/dist/chunk-WRUWNKDB.mjs.map +1 -0
  41. package/dist/chunk-WTHHXXIK.mjs +366 -0
  42. package/dist/chunk-WTHHXXIK.mjs.map +1 -0
  43. package/dist/chunk-XFDXTFV3.mjs +28 -0
  44. package/dist/chunk-XFDXTFV3.mjs.map +1 -0
  45. package/dist/cost/index.d.ts +114 -0
  46. package/dist/cost/index.mjs +13 -0
  47. package/dist/cost/index.mjs.map +1 -0
  48. package/dist/curation/index.d.ts +98 -0
  49. package/dist/curation/index.mjs +13 -0
  50. package/dist/curation/index.mjs.map +1 -0
  51. package/dist/evaluate-DisH3H7u.d.ts +84 -0
  52. package/dist/image/index.d.ts +79 -0
  53. package/dist/image/index.mjs +3 -0
  54. package/dist/image/index.mjs.map +1 -0
  55. package/dist/index-BICjPG8H.d.ts +132 -0
  56. package/dist/index-D8nL3fPZ.d.ts +171 -0
  57. package/dist/index.d.ts +94 -0
  58. package/dist/index.mjs +33 -0
  59. package/dist/index.mjs.map +1 -0
  60. package/dist/llm/index.d.ts +48 -0
  61. package/dist/llm/index.mjs +4 -0
  62. package/dist/llm/index.mjs.map +1 -0
  63. package/dist/overlay/index.d.ts +67 -0
  64. package/dist/overlay/index.mjs +3 -0
  65. package/dist/overlay/index.mjs.map +1 -0
  66. package/dist/picker/index.d.ts +11 -0
  67. package/dist/picker/index.mjs +26 -0
  68. package/dist/picker/index.mjs.map +1 -0
  69. package/dist/pricing/index.d.ts +106 -0
  70. package/dist/pricing/index.mjs +3 -0
  71. package/dist/pricing/index.mjs.map +1 -0
  72. package/dist/providers/index.d.ts +78 -0
  73. package/dist/providers/index.mjs +237 -0
  74. package/dist/providers/index.mjs.map +1 -0
  75. package/dist/schema/index.d.ts +627 -0
  76. package/dist/schema/index.mjs +4 -0
  77. package/dist/schema/index.mjs.map +1 -0
  78. package/dist/schema/voice.d.ts +66 -0
  79. package/dist/schema/voice.mjs +3 -0
  80. package/dist/schema/voice.mjs.map +1 -0
  81. package/dist/video/index.d.ts +78 -0
  82. package/dist/video/index.mjs +3 -0
  83. package/dist/video/index.mjs.map +1 -0
  84. package/dist/voice/index.d.ts +1300 -0
  85. package/dist/voice/index.mjs +4 -0
  86. package/dist/voice/index.mjs.map +1 -0
  87. package/package.json +137 -0
@@ -0,0 +1,94 @@
1
+ export { ImageAspectRatio, ImageAspectRatioSchema, ImageCapabilities, ImageCapabilitiesSchema, ImageEntry, ImageEntrySchema, ImagePricing, ImagePricingSchema, ImageReferenceImages, ImageReferenceImagesSchema, LLMEntry, LLMEntrySchema, LlmPricing, LlmPricingSchema, ModelEntry, ModelEntrySchema, VideoCapabilities, VideoCapabilitiesSchema, VideoCostMultipliers, VideoCostMultipliersSchema, VideoEntry, VideoEntrySchema, VideoPricing, VideoPricingSchema, VideoResolution, VideoResolutionSchema } from './schema/index.js';
2
+ export { D as DEFAULT_PRICING, L as LLMCreditCostResult, b as LLMPricing, c as LLMUsageBreakdown, d as LLM_PRICING_CATALOG, M as MODEL_ALIASES, h as calculateLLMCreditCost, l as resolvePricing } from './catalog-aQHd559b.js';
3
+ export { AGENT_EDITABLE_MODEL_IDS, AGENT_GENERATIVE_MODEL_IDS, AGENT_IMAGE_MODEL_IDS, IMAGE_MODEL_CATALOG, IMAGE_MODEL_IDS, ImageModelDefinition, generateImageModelTable } from './image/index.js';
4
+ export { AGENT_VIDEO_MODEL_IDS, VIDEO_MODEL_CATALOG, VIDEO_MODEL_IDS, VideoModelDefinition, generateVideoModelTable } from './video/index.js';
5
+ export { AGENT_AUDIO_MODEL_IDS, AGENT_STT_MODEL_IDS, AGENT_TTS_MODEL_IDS, AUDIO_MODEL_CATALOG, AUDIO_MODEL_IDS, AudioBillingUnit, AudioModality, AudioModelDefinition, AudioProvider, DEFAULT_GEMINI_LIVE_MODEL, GEMINI_LIVE_MODEL_IDS, S2S_MODEL_IDS, generateAudioModelTable, isAcceptedGeminiLiveModel } from './audio/index.js';
6
+ export { CatalogVoice, CatalogVoiceProvider, CatalogVoiceProviderSchema, CatalogVoiceSchema } from './schema/voice.js';
7
+ export { BAKED_VOICE_PREVIEWS, CatalogVoiceId, ELEVENLABS_VOICES, GEMINI_LIVE_VOICES, MINIMAX_VOICES, NativeVoice, OPENAI_REALTIME_VOICES, VOICE_CATALOG, VOICE_PREVIEW_BASE, VOICE_PREVIEW_LOCALES, VoiceCurationOverrides, VoiceRef, curateVoice, getFeaturedVoices, getProviderForVoice, getVoiceByCatalogId, getVoiceById, getVoiceByProviderVoiceId, getVoiceCatalog, resolveVoice, slugifyVoiceId, voicePreviewUrl } from './voice/index.js';
8
+ export { ProviderGroup, SurfaceProfile, applyProfile, expandProviders, filterVoicesByProviders, getProviderGroup, getSurfaceProfile, groupForProvider, listProviderGroups, listSurfaceProfiles, listSurfaced, modelMatchesProfile } from './curation/index.js';
9
+ export { CC_USD_RATE, CREDIT_USD_RATE, DEFAULT_PRICING_FLOORS, DEFAULT_PRICING_MARKUP, PricingCategory, PricingMarkup, computeCenticredits, pricingRegistry } from './pricing/index.js';
10
+ export { CalculateCostOptions, CostResult, CostUsage, CostUsageKindMismatchError, UnknownModelError, calculateAudioCost, calculateCost, calculateImageCost, calculateLLMCost, calculateVideoCost } from './cost/index.js';
11
+ export { ShouldDebitDecision, ShouldDebitInput, shouldDebit } from './byok/index.js';
12
+ export { A as AccessDecision, a as AccessEffect, b as AccessEvalInput, c as AccessRule, d as AccessTarget, e as AppScope, f as evaluateAccess } from './evaluate-DisH3H7u.js';
13
+ export { CatalogDefaultDecision, evaluateCatalogDefaults } from './access/index.js';
14
+ export { CatalogOverlay, MergedOverlay, clearCatalogOverlays, getMergedOverlay, registerCatalogOverlay } from './overlay/index.js';
15
+ import { R as ResolvedModel } from './index-BICjPG8H.js';
16
+ export { C as CatalogKind, L as ListModelsFilter, g as getModel, a as getModelsByProvider, b as getStaticModelProvider, i as isAgentVisible, l as listModels, r as resolveAlias } from './index-BICjPG8H.js';
17
+ export { A as AvailableConnector, a as AvailableModel, b as AvailableModelCapabilities, c as AvailableModelsActor, d as AvailableModelsResponse, L as ListAvailableModelsParams, M as ModelEnrichment, g as getEnrichment, m as modelHasAction, e as modelHasTag, f as modelMatchesCatalogPriceTier, h as modelMatchesKind, i as modelMatchesPriceTier, p as priceTierForModel } from './index-D8nL3fPZ.js';
18
+ export { A as AudioCapabilities, a as AudioCapabilitiesSchema, b as AudioEntry, c as AudioEntrySchema, d as AudioPricing, e as AudioPricingSchema } from './audio-BzVF_wke.js';
19
+ export { a as CatalogPriceTier, b as CatalogPriceTierSchema, C as CatalogProvider, c as CatalogProviderSchema, L as Lifecycle, d as LifecycleSchema, M as ModelKind, e as ModelKindSchema, N as NsfwPolicy, f as NsfwPolicySchema, g as baseEntryShape } from './base-BNHcMifc.js';
20
+ import 'zod';
21
+
22
+ /**
23
+ * Action projection — `<kind>:<verb>` namespaced strings derived from
24
+ * each model's per-kind capability object.
25
+ *
26
+ * Convention:
27
+ * - `image:generate`, `image:edit`, `image:upscale`, `image:reference`
28
+ * - `video:text_to`, `video:image_to`, `video:subject_reference`,
29
+ * `video:audio`
30
+ * - `audio:tts`, `audio:stt`, `audio:realtime`
31
+ * - `llm:vision`, `llm:tool_use`, `llm:reasoning`, `llm:long_context`
32
+ *
33
+ * Always `<kind>:<verb_or_modifier>`, snake_case.
34
+ *
35
+ * Action tags share a string array with curation tags but live behind the
36
+ * reserved `<kind>:` prefix. Curation tags MUST NOT use the prefix —
37
+ * `assertReservedPrefixDiscipline` enforces this at module load.
38
+ *
39
+ * The reason this lives in the catalog package (not enrichment) is that
40
+ * actions are intrinsic to a model — derived from its capability fields,
41
+ * not subjectively curated. Keeping the projection separate makes it
42
+ * trivially callable from anywhere (e.g. a UI badge component) without
43
+ * pulling the heuristic enrichment table.
44
+ */
45
+
46
+ /**
47
+ * Compute the action tags a model supports. Returns an empty array for
48
+ * models with no recognized capability bits (defensive — never throws).
49
+ */
50
+ declare function getActions(model: ResolvedModel): string[];
51
+ /**
52
+ * Validate that a string array intended as curation tags does not use a
53
+ * reserved `<kind>:` prefix. Run at module load on the explicit
54
+ * enrichment map; throws on violation so the offending entry is caught
55
+ * before any access decision is made.
56
+ *
57
+ * Caller pattern (in tests / module-load init):
58
+ * for (const e of Object.values(EXPLICIT_ENRICHMENT))
59
+ * assertReservedPrefixDiscipline(e.tags)
60
+ */
61
+ declare function assertReservedPrefixDiscipline(curationTags: readonly string[]): void;
62
+ /**
63
+ * Returns true iff the given tag is in the reserved action-tag namespace.
64
+ * Useful for callers that need to display curation tags only (e.g.
65
+ * an admin UI) without hardcoding the prefix list.
66
+ */
67
+ declare function isActionTag(tag: string): boolean;
68
+
69
+ /**
70
+ * @agentproto/model-catalog — unified model catalog.
71
+ *
72
+ * Single source of truth for LLM, image, video, audio, and voice model
73
+ * entries. Owns cost dispatch, BYOK policy, and access control evaluation.
74
+ * Zod-only OSS core; @agentproto/model-catalog layers billing/access/BYOK
75
+ * policy on top.
76
+ *
77
+ * Subpath imports for tree-shaking:
78
+ * import { LLM_PRICING_CATALOG } from "@agentproto/model-catalog/llm"
79
+ * import { calculateCost } from "@agentproto/model-catalog/cost"
80
+ * import { shouldDebit } from "@agentproto/model-catalog/byok"
81
+ * import { evaluateAccess } from "@agentproto/model-catalog/access"
82
+ * import { VOICE_CATALOG } from "@agentproto/model-catalog/voice"
83
+ * import { listSurfaced } from "@agentproto/model-catalog/curation"
84
+ */
85
+
86
+ /**
87
+ * Display price gauge level (1..5) for a model id — resolves the catalog
88
+ * entry then defers to {@link priceTierForModel}. 0 for an unknown id.
89
+ * The id→level convenience used by the WhatsApp / slash pickers, which carry
90
+ * a model id rather than a resolved model.
91
+ */
92
+ declare function priceTierForModelId(id: string): number;
93
+
94
+ export { ResolvedModel, assertReservedPrefixDiscipline, getActions, isActionTag, priceTierForModelId };
package/dist/index.mjs ADDED
@@ -0,0 +1,33 @@
1
+ export { applyProfile, expandProviders, filterVoicesByProviders, getProviderGroup, getSurfaceProfile, groupForProvider, listProviderGroups, listSurfaceProfiles, listSurfaced, modelMatchesProfile } from './chunk-CINXNTU3.mjs';
2
+ export { CostUsageKindMismatchError, UnknownModelError, calculateAudioCost, calculateCost, calculateImageCost, calculateLLMCost, calculateVideoCost } from './chunk-IORIAFK2.mjs';
3
+ import { getModel } from './chunk-GH7PB5FB.mjs';
4
+ export { getModel, getModelsByProvider, getStaticModelProvider, isAgentVisible, listModels, resolveAlias } from './chunk-GH7PB5FB.mjs';
5
+ export { shouldDebit } from './chunk-XFDXTFV3.mjs';
6
+ export { evaluateAccess, evaluateCatalogDefaults } from './chunk-HRRG2RZO.mjs';
7
+ import { priceTierForModel } from './chunk-WTHHXXIK.mjs';
8
+ export { assertReservedPrefixDiscipline, getActions, getEnrichment, isActionTag, modelHasAction, modelHasTag, modelMatchesCatalogPriceTier, modelMatchesKind, modelMatchesPriceTier, priceTierForModel } from './chunk-WTHHXXIK.mjs';
9
+ export { clearCatalogOverlays, getMergedOverlay, registerCatalogOverlay } from './chunk-H6JUTF3U.mjs';
10
+ export { AudioCapabilitiesSchema, AudioEntrySchema, AudioPricingSchema, CatalogPriceTierSchema, CatalogProviderSchema, ImageAspectRatioSchema, ImageCapabilitiesSchema, ImageEntrySchema, ImagePricingSchema, ImageReferenceImagesSchema, LLMEntrySchema, LifecycleSchema, LlmPricingSchema, ModelEntrySchema, ModelKindSchema, NsfwPolicySchema, VideoCapabilitiesSchema, VideoCostMultipliersSchema, VideoEntrySchema, VideoPricingSchema, VideoResolutionSchema, baseEntryShape } from './chunk-F7OEHYUI.mjs';
11
+ export { DEFAULT_PRICING, LLM_PRICING_CATALOG, MODEL_ALIASES, calculateLLMCreditCost, resolvePricing } from './chunk-OHAMH3ZE.mjs';
12
+ export { CC_USD_RATE, CREDIT_USD_RATE, DEFAULT_PRICING_FLOORS, DEFAULT_PRICING_MARKUP, computeCenticredits, pricingRegistry } from './chunk-QHELXPSL.mjs';
13
+ export { AGENT_EDITABLE_MODEL_IDS, AGENT_GENERATIVE_MODEL_IDS, AGENT_IMAGE_MODEL_IDS, IMAGE_MODEL_CATALOG, IMAGE_MODEL_IDS, generateImageModelTable } from './chunk-2LWYZOWB.mjs';
14
+ export { AGENT_VIDEO_MODEL_IDS, VIDEO_MODEL_CATALOG, VIDEO_MODEL_IDS, generateVideoModelTable } from './chunk-IJZ4XPO2.mjs';
15
+ export { AGENT_AUDIO_MODEL_IDS, AGENT_STT_MODEL_IDS, AGENT_TTS_MODEL_IDS, AUDIO_MODEL_CATALOG, AUDIO_MODEL_IDS, DEFAULT_GEMINI_LIVE_MODEL, GEMINI_LIVE_MODEL_IDS, S2S_MODEL_IDS, generateAudioModelTable, isAcceptedGeminiLiveModel } from './chunk-WRUWNKDB.mjs';
16
+ export { BAKED_VOICE_PREVIEWS, ELEVENLABS_VOICES, GEMINI_LIVE_VOICES, MINIMAX_VOICES, OPENAI_REALTIME_VOICES, VOICE_CATALOG, VOICE_PREVIEW_BASE, VOICE_PREVIEW_LOCALES, curateVoice, getFeaturedVoices, getProviderForVoice, getVoiceByCatalogId, getVoiceById, getVoiceByProviderVoiceId, getVoiceCatalog, resolveVoice, slugifyVoiceId, voicePreviewUrl } from './chunk-SGJR6ZQH.mjs';
17
+ export { CatalogVoiceProviderSchema, CatalogVoiceSchema } from './chunk-HEDDSOZF.mjs';
18
+
19
+ /**
20
+ * @agentproto/model-catalog v0.1.0
21
+ * Unified model catalog: LLM, image, video, audio entries + cost dispatcher + picker.
22
+ * Zod-only OSS core; @agstudio/model-catalog layers billing/access/BYOK on top.
23
+ */
24
+
25
+ // src/index.ts
26
+ function priceTierForModelId(id) {
27
+ const model = getModel(id);
28
+ return model ? priceTierForModel(model) : 0;
29
+ }
30
+
31
+ export { priceTierForModelId };
32
+ //# sourceMappingURL=index.mjs.map
33
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoEO,SAAS,oBAAoB,EAAA,EAAoB;AACtD,EAAA,MAAM,KAAA,GAAQ,SAAS,EAAE,CAAA;AACzB,EAAA,OAAO,KAAA,GAAQ,iBAAA,CAA0B,KAAK,CAAA,GAAI,CAAA;AACpD","file":"index.mjs","sourcesContent":["/**\n * @agentproto/model-catalog — unified model catalog.\n *\n * Single source of truth for LLM, image, video, audio, and voice model\n * entries. Owns cost dispatch, BYOK policy, and access control evaluation.\n * Zod-only OSS core; @agentproto/model-catalog layers billing/access/BYOK\n * policy on top.\n *\n * Subpath imports for tree-shaking:\n * import { LLM_PRICING_CATALOG } from \"@agentproto/model-catalog/llm\"\n * import { calculateCost } from \"@agentproto/model-catalog/cost\"\n * import { shouldDebit } from \"@agentproto/model-catalog/byok\"\n * import { evaluateAccess } from \"@agentproto/model-catalog/access\"\n * import { VOICE_CATALOG } from \"@agentproto/model-catalog/voice\"\n * import { listSurfaced } from \"@agentproto/model-catalog/curation\"\n */\n\nexport * from \"./schema/index.js\"\n// LLM has its own `resolveAlias` (legacy back-compat for the app legacy pricing module).\n// At the top level we prefer the cross-kind `resolveAlias` from the registry.\nexport {\n LLM_PRICING_CATALOG,\n MODEL_ALIASES,\n DEFAULT_PRICING,\n resolvePricing,\n calculateLLMCreditCost,\n} from \"./llm/index.js\"\nexport type {\n LLMPricing,\n LLMUsageBreakdown,\n LLMCreditCostResult,\n} from \"./llm/index.js\"\nexport * from \"./image/index.js\"\nexport * from \"./video/index.js\"\nexport * from \"./audio/index.js\"\nexport * from \"./voice/index.js\"\nexport * from \"./curation/index.js\"\nexport * from \"./pricing/index.js\"\nexport * from \"./cost/index.js\"\nexport * from \"./byok/index.js\"\nexport * from \"./access/index.js\"\nexport * from \"./overlay/index.js\"\nexport * from \"./registry/index.js\"\nexport {\n getActions,\n isActionTag,\n assertReservedPrefixDiscipline,\n} from \"./registry/actions.js\"\nexport {\n getEnrichment,\n modelHasTag,\n modelHasAction,\n modelMatchesCatalogPriceTier,\n modelMatchesPriceTier,\n modelMatchesKind,\n priceTierForModel,\n type ModelEnrichment,\n} from \"./enrichment/index.js\"\n\nimport { getModel } from \"./registry/index.js\"\nimport { priceTierForModel as priceTierForModelInternal } from \"./enrichment/index.js\"\n\n/**\n * Display price gauge level (1..5) for a model id — resolves the catalog\n * entry then defers to {@link priceTierForModel}. 0 for an unknown id.\n * The id→level convenience used by the WhatsApp / slash pickers, which carry\n * a model id rather than a resolved model.\n */\nexport function priceTierForModelId(id: string): number {\n const model = getModel(id)\n return model ? priceTierForModelInternal(model) : 0\n}\nexport type {\n AvailableModel,\n AvailableModelCapabilities,\n AvailableConnector,\n AvailableModelsActor,\n AvailableModelsResponse,\n ListAvailableModelsParams,\n} from \"./picker/index.js\"\n"]}
@@ -0,0 +1,48 @@
1
+ export { C as CacheStats, a as CalculateLLMCreditCostOptions, D as DEFAULT_PRICING, K as KnownLlmId, L as LLMCreditCostResult, b as LLMPricing, c as LLMUsageBreakdown, d as LLM_PRICING_CATALOG, e as LlmModelAlias, f as LlmModelId, M as MODEL_ALIASES, g as ModelRoute, h as calculateLLMCreditCost, i as getCacheStats, j as getModelProvider, r as resolveAlias, k as resolveModelRoute, l as resolvePricing } from '../catalog-aQHd559b.js';
2
+ import '../base-BNHcMifc.js';
3
+ import 'zod';
4
+
5
+ /**
6
+ * Curated, SDK-ready LLM model ids.
7
+ *
8
+ * Centralizes the version-specific provider ids used at runtime so call
9
+ * sites stop carrying string literals. Pricing for each is resolved
10
+ * automatically through `MODEL_ALIASES` in `catalog.ts` (e.g.
11
+ * `claude-sonnet-4-6` → `claude-sonnet-4-5`).
12
+ *
13
+ * Update one constant here when bumping the platform-wide default —
14
+ * every workflow step and operator config picks up the new id with a
15
+ * single rebuild.
16
+ */
17
+ /** Fast workhorse for content workflows (outline, post, sections). */
18
+ declare const WORKFLOW_FAST_MODEL: "claude-sonnet-4-6";
19
+ /** Premium tier for high-stakes generation (rarely used in workflows). */
20
+ declare const WORKFLOW_PREMIUM_MODEL: "claude-opus-4-6";
21
+ /** Cheap-and-quick for short outputs like titles. */
22
+ declare const WORKFLOW_TINY_MODEL: "claude-haiku-4-5-20251001";
23
+ /**
24
+ * Models eligible for operator agents (an app). Keep in sync with the
25
+ * agent-framework's model-provider config. The literal tuple drives the
26
+ * `OperatorAgentModel` union type below.
27
+ */
28
+ declare const OPERATOR_AGENT_MODELS: readonly ["claude-opus-4-5", "claude-sonnet-4-5", "gemini-3.1-pro-preview"];
29
+ type OperatorAgentModel = (typeof OPERATOR_AGENT_MODELS)[number];
30
+ /** Default operator model when no explicit choice is made. */
31
+ declare const OPERATOR_DEFAULT_PREMIUM: OperatorAgentModel;
32
+ declare const OPERATOR_DEFAULT_STANDARD: OperatorAgentModel;
33
+ declare const OPERATOR_DEFAULT_GEMINI: OperatorAgentModel;
34
+ declare const LLM_TIERS: {
35
+ /** Cheap-and-quick. Single-model fallback. */
36
+ readonly nano: readonly ["mistral-small-creative-latest"];
37
+ /** Low-cost, agentic-capable. Direct alt-providers. */
38
+ readonly mini: readonly ["MiniMax-M2.5", "MiniMax-M2.1", "MiniMax-M2", "mistral-large-latest"];
39
+ /** Medium cost, fast inference + good general perf. OpenRouter-routed. */
40
+ readonly lite: readonly ["x-ai/grok-4-fast", "xiaomi/mimo-v2-flash", "google/gemini-3-flash-preview"];
41
+ /** High quality, premium features. Mix of direct + OpenRouter. */
42
+ readonly plus: readonly ["claude-sonnet-4-5", "gpt-4o", "kimi-k2.5", "deepseek/deepseek-v3.2"];
43
+ /** Top-tier, best performance. */
44
+ readonly pro: readonly ["claude-opus-4-5", "google/gemini-3.1-pro-preview", "kimi-k2-thinking"];
45
+ };
46
+ type LlmTierName = keyof typeof LLM_TIERS;
47
+
48
+ export { LLM_TIERS, type LlmTierName, OPERATOR_AGENT_MODELS, OPERATOR_DEFAULT_GEMINI, OPERATOR_DEFAULT_PREMIUM, OPERATOR_DEFAULT_STANDARD, type OperatorAgentModel, WORKFLOW_FAST_MODEL, WORKFLOW_PREMIUM_MODEL, WORKFLOW_TINY_MODEL };
@@ -0,0 +1,4 @@
1
+ export { DEFAULT_PRICING, LLM_PRICING_CATALOG, LLM_TIERS, MODEL_ALIASES, OPERATOR_AGENT_MODELS, OPERATOR_DEFAULT_GEMINI, OPERATOR_DEFAULT_PREMIUM, OPERATOR_DEFAULT_STANDARD, WORKFLOW_FAST_MODEL, WORKFLOW_PREMIUM_MODEL, WORKFLOW_TINY_MODEL, calculateLLMCreditCost, getCacheStats, getModelProvider, resolveAlias, resolveModelRoute, resolvePricing } from '../chunk-OHAMH3ZE.mjs';
2
+ import '../chunk-QHELXPSL.mjs';
3
+ //# sourceMappingURL=index.mjs.map
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -0,0 +1,67 @@
1
+ import { b as LLMPricing } from '../catalog-aQHd559b.js';
2
+ import { ImageModelDefinition } from '../image/index.js';
3
+ import { VideoModelDefinition } from '../video/index.js';
4
+ import { AudioModelDefinition } from '../audio/index.js';
5
+ import { CatalogVoice } from '../schema/voice.js';
6
+ import '../base-BNHcMifc.js';
7
+ import 'zod';
8
+ import '../audio-BzVF_wke.js';
9
+
10
+ /**
11
+ * Consumer catalog overlays.
12
+ *
13
+ * The OSS core ships only generated, provider-native data. Anything
14
+ * app-specific — legacy alias slugs persisted in an app's DB (e.g. a product's
15
+ * legacy voice ids), a private fine-tune, a renamed model — is registered
16
+ * by the consumer at boot as an **overlay**, never patched into the core data.
17
+ *
18
+ * import { registerCatalogOverlay } from "@agentproto/model-catalog/overlay"
19
+ * registerCatalogOverlay({
20
+ * aliases: { "legacy-voice-1": "minimax-french-female-anchor" },
21
+ * image: { "my-finetune": { …ImageModelDefinition } },
22
+ * })
23
+ *
24
+ * The registry (`getModel` / `resolveAlias` / `listModels`) consults the merged
25
+ * overlay first, then falls through to the generated catalogs. Registration is
26
+ * additive and idempotent-by-key (a later overlay overrides an earlier one for
27
+ * the same id). `clearCatalogOverlays()` resets — used by tests.
28
+ */
29
+
30
+ interface CatalogOverlay {
31
+ /**
32
+ * Extra alias → canonical-id mappings, any kind. Resolution is followed
33
+ * (chains collapse), so `{ "legacy-voice-1": "minimax-…" }` makes `getModel`,
34
+ * `resolveAlias`, and `isAgentVisible` all treat `legacy-voice-1` as the minimax
35
+ * voice. The target should be a real id in the core catalog or this overlay.
36
+ */
37
+ aliases?: Record<string, string>;
38
+ /** Extra or overriding LLM pricing entries, keyed by model id. */
39
+ llm?: Record<string, LLMPricing>;
40
+ /** Extra or overriding image model entries, keyed by model id. */
41
+ image?: Record<string, ImageModelDefinition>;
42
+ /** Extra or overriding video model entries, keyed by model id. */
43
+ video?: Record<string, VideoModelDefinition>;
44
+ /** Extra or overriding audio model entries, keyed by model id. */
45
+ audio?: Record<string, AudioModelDefinition>;
46
+ /** Extra voices (matched by catalogId / providerVoiceId / their aliases). */
47
+ voice?: CatalogVoice[];
48
+ }
49
+ /** The merged, registered overlay state. Same shape as a single overlay but
50
+ * with all registrations folded in (last-write-wins per key). */
51
+ interface MergedOverlay {
52
+ aliases: Record<string, string>;
53
+ llm: Record<string, LLMPricing>;
54
+ image: Record<string, ImageModelDefinition>;
55
+ video: Record<string, VideoModelDefinition>;
56
+ audio: Record<string, AudioModelDefinition>;
57
+ voice: CatalogVoice[];
58
+ }
59
+ /** Register a consumer overlay. Folds into the merged state; later
60
+ * registrations override earlier ones for the same id. */
61
+ declare function registerCatalogOverlay(overlay: CatalogOverlay): void;
62
+ /** The current merged overlay. Read-only snapshot for the registry. */
63
+ declare function getMergedOverlay(): MergedOverlay;
64
+ /** Reset all overlays (tests / re-init). */
65
+ declare function clearCatalogOverlays(): void;
66
+
67
+ export { type CatalogOverlay, type MergedOverlay, clearCatalogOverlays, getMergedOverlay, registerCatalogOverlay };
@@ -0,0 +1,3 @@
1
+ export { clearCatalogOverlays, getMergedOverlay, registerCatalogOverlay } from '../chunk-H6JUTF3U.mjs';
2
+ //# sourceMappingURL=index.mjs.map
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -0,0 +1,11 @@
1
+ import '../evaluate-DisH3H7u.js';
2
+ import '../base-BNHcMifc.js';
3
+ export { A as AvailableConnector, a as AvailableModel, b as AvailableModelCapabilities, c as AvailableModelsActor, d as AvailableModelsResponse, L as ListAvailableModelsParams, P as PRICE_TIER_NAMES, j as PRICE_TIER_SLOTS, k as priceTierBar, l as priceTierName } from '../index-D8nL3fPZ.js';
4
+ import '../index-BICjPG8H.js';
5
+ import '../catalog-aQHd559b.js';
6
+ import '../image/index.js';
7
+ import '../video/index.js';
8
+ import '../audio/index.js';
9
+ import '../audio-BzVF_wke.js';
10
+ import 'zod';
11
+ import '../schema/voice.js';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @agentproto/model-catalog v0.1.0
3
+ * Unified model catalog: LLM, image, video, audio entries + cost dispatcher + picker.
4
+ * Zod-only OSS core; @agstudio/model-catalog layers billing/access/BYOK on top.
5
+ */
6
+
7
+ // src/picker/index.ts
8
+ var PRICE_TIER_SLOTS = 5;
9
+ var PRICE_TIER_NAMES = [
10
+ "Low",
11
+ "Medium",
12
+ "High",
13
+ "Max",
14
+ "Ultra"
15
+ ];
16
+ function priceTierName(level) {
17
+ return PRICE_TIER_NAMES[level - 1] ?? "";
18
+ }
19
+ function priceTierBar(level, slots = PRICE_TIER_SLOTS) {
20
+ const n = Math.max(0, Math.min(level, slots));
21
+ return "\u25B0".repeat(n) + "\u25B1".repeat(slots - n);
22
+ }
23
+
24
+ export { PRICE_TIER_NAMES, PRICE_TIER_SLOTS, priceTierBar, priceTierName };
25
+ //# sourceMappingURL=index.mjs.map
26
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/picker/index.ts"],"names":[],"mappings":";;;;;;;AA4EO,IAAM,gBAAA,GAAmB;AAMzB,IAAM,gBAAA,GAAmB;AAAA,EAC9B,KAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF;AAGO,SAAS,cAAc,KAAA,EAAuB;AACnD,EAAA,OAAO,gBAAA,CAAiB,KAAA,GAAQ,CAAC,CAAA,IAAK,EAAA;AACxC;AAMO,SAAS,YAAA,CAAa,KAAA,EAAe,KAAA,GAAQ,gBAAA,EAA0B;AAC5E,EAAA,MAAM,CAAA,GAAI,KAAK,GAAA,CAAI,CAAA,EAAG,KAAK,GAAA,CAAI,KAAA,EAAO,KAAK,CAAC,CAAA;AAC5C,EAAA,OAAO,SAAI,MAAA,CAAO,CAAC,IAAI,QAAA,CAAI,MAAA,CAAO,QAAQ,CAAC,CAAA;AAC7C","file":"index.mjs","sourcesContent":["/**\n * Picker subpath — wire shapes returned by the per-app\n * `GET /models/available` route. Single source of truth shared by:\n * - the server-side helper (an app-side model-access helper)\n * - the per-app SDK clients (e.g. an app SDK client)\n * - the cross-app picker hook (an app picker hook)\n *\n * Without this single source the hook + SDK previously drifted from\n * the API contract and a fetcher in the app silently kept calling\n * with a stale auth pattern after the cookie-auth migration.\n */\n\nimport type { AccessDecision } from \"../access/index.js\"\nimport type { ModelEnrichment } from \"../enrichment/index.js\"\nimport type { ModelKind } from \"../schema/index.js\"\n\nexport interface AvailableModelCapabilities {\n generate?: boolean\n edit?: boolean\n upscale?: boolean\n textToVideo?: boolean\n imageToVideo?: boolean\n audio?: boolean\n subjectReference?: boolean\n tts?: boolean\n stt?: boolean\n s2s?: boolean\n}\n\nexport interface AvailableModel {\n id: string\n /** Canonical model id (LLM aliases collapse here). */\n canonicalId: string\n /**\n * Priced model kind. Typed `ModelKind` (not `CatalogKind`) on purpose: the\n * picker never surfaces `voice` rows as `AvailableModel` — voices reach the\n * UI through a separate path — so `voice` is intentionally out of range here.\n */\n kind: ModelKind\n displayName: string\n description: string\n enrichment: ModelEnrichment\n decision: AccessDecision\n capabilities: AvailableModelCapabilities\n /** Recommended pricing display (per provider unit). */\n pricingHint?: string\n /**\n * Audio models only: cost normalized to **per minute of speech**, the\n * intuitive unit for the voice picker. TTS (billed per 1k chars) is\n * converted via an assumed speaking rate; per-minute models pass through.\n */\n voiceHint?: string\n /**\n * Relative price gauge level (1..{@link PRICE_TIER_SLOTS}) from\n * `priceTierForModel` — the visual \"price mostly\" indicator the picker\n * renders as a segmented bar instead of a raw number. 0 when unknown.\n */\n priceTier?: number\n /** Localized-agnostic tier name for `priceTier` (e.g. `\"High\"`). */\n priceTierName?: string\n}\n\nexport interface AvailableConnector {\n id: string\n name: string\n /** Whether the actor's guild/workspace has a connected credential for this provider. */\n byokAvailable: boolean\n models: AvailableModel[]\n}\n\n// ── Price-tier gauge ─────────────────────────────────────────────────────────\n// A relative, comparative price indicator (\"price mostly\") — a 1..N level\n// (from `priceTierForModel`) shown as a filled/empty bar instead of an exact\n// number. This module owns the gauge's shape: slot count, names, rendering.\n\n/** Number of segments in the price gauge. */\nexport const PRICE_TIER_SLOTS = 5\n\n/**\n * Display names for levels 1..{@link PRICE_TIER_SLOTS}, ascending price. Kept\n * as brand tokens (not localized) so the gauge reads the same everywhere.\n */\nexport const PRICE_TIER_NAMES = [\n \"Low\",\n \"Medium\",\n \"High\",\n \"Max\",\n \"Ultra\",\n] as const\n\n/** Name for a gauge level (1-based); empty string when out of range. */\nexport function priceTierName(level: number): string {\n return PRICE_TIER_NAMES[level - 1] ?? \"\"\n}\n\n/**\n * Unicode price gauge (e.g. `▰▰▱▱▱`) for text-only surfaces (WhatsApp, logs).\n * Rich UIs read {@link AvailableModel.priceTier} and render styled segments.\n */\nexport function priceTierBar(level: number, slots = PRICE_TIER_SLOTS): string {\n const n = Math.max(0, Math.min(level, slots))\n return \"▰\".repeat(n) + \"▱\".repeat(slots - n)\n}\n\nexport interface AvailableModelsActor {\n appId: string\n userId: string\n tier?: string\n guildId?: string\n}\n\nexport interface AvailableModelsResponse {\n success: true\n actor: AvailableModelsActor\n connectors: AvailableConnector[]\n}\n\nexport interface ListAvailableModelsParams {\n /** Restrict to one or more kinds. Empty = all kinds. */\n kind?: ModelKind | ModelKind[]\n /** Guild scope — joins guild-level connectors for BYOK badges. */\n guildId?: string\n /** Include rules-blocked models (decision.allowed=false). Default true. */\n includeBlocked?: boolean\n /** Include catalog entries with agentVisible=false. Default false. */\n includeHidden?: boolean\n /**\n * Curation surface-profile id (`voice-s2s`, `images`, …) the app exposes.\n * Resolved server-side via `getSurfaceProfile`. Omitted = full catalog.\n */\n surface?: string\n}\n"]}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Pricing registry — single source of truth for the formula that turns
3
+ * a provider's USD cost into centicredits charged to the user.
4
+ *
5
+ * centicredits = max(floor_cc, ceil(baseCost × markup / CC_USD_RATE))
6
+ *
7
+ * Unit: **centicredits (cc)** throughout. 1 displayed credit = 100 cc.
8
+ * Internal ledger column (`credit_transactions.credits`) stores cc, so
9
+ * dispatcher output flows straight into the ledger with no per-call
10
+ * `× 100` conversion. UI surfaces format cc → displayed credits at the
11
+ * render boundary via `displayCredits(cc) → cr`.
12
+ *
13
+ * Why a registry (not constants):
14
+ * - The DEFAULTS work across apps. Most consumers (image gen, STT,
15
+ * etc.) need exactly the same markup ratios regardless of which
16
+ * app called them.
17
+ * - But apps want overrides — one app might want a lower video markup
18
+ * during a promo, another a higher one because their
19
+ * users skew heavier. `registerApp(appId, { video: 1.8 })` slots
20
+ * in without changing the catalog or the cost dispatcher.
21
+ * - Per-model `overrideCreditCost` is the third lever — a specific
22
+ * model can opt out of the formula entirely for strategic reasons
23
+ * (subsidized adoption, partner pricing).
24
+ *
25
+ * Lever priority (highest to lowest):
26
+ * 1. `model.overrideCreditCost` — explicit cc-per-call, catalog entry
27
+ * 2. app-scoped markup — `registerApp(appId, partial)`
28
+ * 3. core default markup — `DEFAULT_PRICING_MARKUP`
29
+ *
30
+ * Currency: all provider rates are USD. 1 displayed credit = €0.01
31
+ * retail ≈ $0.0108. Multi-currency selling prices live in per-app
32
+ * plans-data — the markup formula itself stays USD-anchored.
33
+ */
34
+ /**
35
+ * Conversion: USD ↔ displayed credit. 1 displayed credit = €0.01
36
+ * retail at pack rate. Prefer `CC_USD_RATE` for credit math — it
37
+ * matches the cc unit the dispatcher emits.
38
+ */
39
+ declare const CREDIT_USD_RATE = 0.0108;
40
+ /**
41
+ * USD per centicredit. 1 cc = 1/100 of a displayed credit, so
42
+ * `CC_USD_RATE = CREDIT_USD_RATE / 100`. Pre-computed once so the hot
43
+ * `× markup / CC_USD_RATE` divide doesn't repeat the constant math.
44
+ */
45
+ declare const CC_USD_RATE: number;
46
+ type PricingCategory = "image" | "video" | "audio" | "text" | "search";
47
+ interface PricingMarkup {
48
+ /** Per-category markup applied to `baseCost` before USD→cc conversion. */
49
+ markup: Partial<Record<PricingCategory, number>>;
50
+ /**
51
+ * Minimum centicredits debited per action (protects against
52
+ * fractional rounding). Default 1 cc = 0.01 displayed credit.
53
+ */
54
+ floor: Partial<Record<PricingCategory, number>>;
55
+ }
56
+ /**
57
+ * Core defaults — what every app gets if it doesn't register
58
+ * overrides. Tuned for ~50%+ gross margin at pack-rate revenue.
59
+ *
60
+ * Adjusting these affects EVERY app — don't tweak without coordinating
61
+ * across apps. Per-app drift goes through
62
+ * `registerApp()`.
63
+ */
64
+ declare const DEFAULT_PRICING_MARKUP: Required<PricingMarkup["markup"]>;
65
+ declare const DEFAULT_PRICING_FLOORS: Required<PricingMarkup["floor"]>;
66
+ /**
67
+ * Registry of app-scoped pricing overrides. Defaults flow through when
68
+ * an app doesn't register; partial overrides merge per-category.
69
+ */
70
+ declare class PricingRegistry {
71
+ private apps;
72
+ registerApp(appId: string, overrides: PricingMarkup): void;
73
+ unregisterApp(appId: string): void;
74
+ /**
75
+ * Remove all registered app overrides, restoring core defaults.
76
+ * Call in `afterEach` hooks to prevent cross-test contamination
77
+ * (the singleton persists across tests in the same Vitest worker).
78
+ */
79
+ reset(): void;
80
+ getMarkup(category: PricingCategory, appId?: string): number;
81
+ getFloor(category: PricingCategory, appId?: string): number;
82
+ /** Resolve the full PricingMarkup for an app (with defaults filled in). */
83
+ resolve(appId?: string): Required<PricingMarkup>;
84
+ }
85
+ declare const pricingRegistry: PricingRegistry;
86
+ /**
87
+ * Formula — turn provider USD cost into **centicredits**.
88
+ *
89
+ * Honors (in priority): `overrideCreditCost` → app markup → default
90
+ * markup. Always applies the floor (in cc).
91
+ *
92
+ * Returns: cc per call (e.g. 53 cc = 0.53 displayed credits).
93
+ */
94
+ declare function computeCenticredits(args: {
95
+ baseCostUsd: number;
96
+ category: PricingCategory;
97
+ /**
98
+ * Per-model centicredit override. When set, bypasses the formula —
99
+ * use for strategic deviations (subsidized adoption, partner
100
+ * pricing). Unit: cc per call.
101
+ */
102
+ overrideCreditCost?: number;
103
+ appId?: string;
104
+ }): number;
105
+
106
+ export { CC_USD_RATE, CREDIT_USD_RATE, DEFAULT_PRICING_FLOORS, DEFAULT_PRICING_MARKUP, type PricingCategory, type PricingMarkup, computeCenticredits, pricingRegistry };
@@ -0,0 +1,3 @@
1
+ export { CC_USD_RATE, CREDIT_USD_RATE, DEFAULT_PRICING_FLOORS, DEFAULT_PRICING_MARKUP, computeCenticredits, pricingRegistry } from '../chunk-QHELXPSL.mjs';
2
+ //# sourceMappingURL=index.mjs.map
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ import { CatalogVoice } from '../schema/voice.js';
3
+
4
+ /**
5
+ * ElevenLabs raw → CatalogVoice mapper.
6
+ *
7
+ * The single source of "how an ElevenLabs `/v1/voices` entry becomes a
8
+ * `CatalogVoice`". Used in two places:
9
+ * - build time, by `@agentproto/catalog-sync` to emit the full baseline
10
+ * voice list from a pinned snapshot;
11
+ * - runtime, by the live-on-setup path (`agentproto auth provider set
12
+ * elevenlabs`) to turn a freshly-fetched account voice library into the
13
+ * local overlay cache.
14
+ *
15
+ * Pure + deterministic — no network, no fs. The raw schema validates both the
16
+ * pinned snapshot and a live response so a provider shape-change surfaces as a
17
+ * parse error, not silent data loss.
18
+ */
19
+
20
+ declare const ElevenLabsRawVoiceSchema: z.ZodObject<{
21
+ voice_id: z.ZodString;
22
+ name: z.ZodString;
23
+ category: z.ZodOptional<z.ZodString>;
24
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
26
+ preview_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ }, z.core.$loose>;
28
+ type ElevenLabsRawVoice = z.infer<typeof ElevenLabsRawVoiceSchema>;
29
+ declare const ElevenLabsVoicesSnapshotSchema: z.ZodObject<{
30
+ voices: z.ZodArray<z.ZodObject<{
31
+ voice_id: z.ZodString;
32
+ name: z.ZodString;
33
+ category: z.ZodOptional<z.ZodString>;
34
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
36
+ preview_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ }, z.core.$loose>>;
38
+ }, z.core.$strip>;
39
+ type ElevenLabsVoicesSnapshot = z.infer<typeof ElevenLabsVoicesSnapshotSchema>;
40
+ /** Map one raw ElevenLabs voice to a `CatalogVoice`. */
41
+ declare function mapElevenLabsVoice(raw: ElevenLabsRawVoice): CatalogVoice;
42
+ /** Map a full `/v1/voices` snapshot to the baseline voice list. */
43
+ declare function mapElevenLabsVoices(snapshot: ElevenLabsVoicesSnapshot): CatalogVoice[];
44
+
45
+ /**
46
+ * MiniMax raw → CatalogVoice mapper.
47
+ *
48
+ * Single source of "how a MiniMax `/v1/get_voice` system voice becomes a
49
+ * `CatalogVoice`". Shared by `@agentproto/catalog-sync` (build-time baseline
50
+ * emit) and the runtime live-on-setup path. Pure + deterministic.
51
+ */
52
+
53
+ declare const MinimaxSystemVoiceSchema: z.ZodObject<{
54
+ voice_id: z.ZodString;
55
+ voice_name: z.ZodString;
56
+ description: z.ZodDefault<z.ZodArray<z.ZodString>>;
57
+ created_time: z.ZodOptional<z.ZodString>;
58
+ }, z.core.$loose>;
59
+ type MinimaxSystemVoice = z.infer<typeof MinimaxSystemVoiceSchema>;
60
+ declare const MinimaxVoicesSnapshotSchema: z.ZodObject<{
61
+ system_voice: z.ZodArray<z.ZodObject<{
62
+ voice_id: z.ZodString;
63
+ voice_name: z.ZodString;
64
+ description: z.ZodDefault<z.ZodArray<z.ZodString>>;
65
+ created_time: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$loose>>;
67
+ base_resp: z.ZodOptional<z.ZodObject<{
68
+ status_code: z.ZodNumber;
69
+ status_msg: z.ZodString;
70
+ }, z.core.$loose>>;
71
+ }, z.core.$loose>;
72
+ type MinimaxVoicesSnapshot = z.infer<typeof MinimaxVoicesSnapshotSchema>;
73
+ /** Map one raw MiniMax system voice to a `CatalogVoice`. */
74
+ declare function mapMinimaxVoice(raw: MinimaxSystemVoice): CatalogVoice;
75
+ /** Map a full `/v1/get_voice` snapshot to the baseline voice list. */
76
+ declare function mapMinimaxVoices(snapshot: MinimaxVoicesSnapshot): CatalogVoice[];
77
+
78
+ export { type ElevenLabsRawVoice, ElevenLabsRawVoiceSchema, type ElevenLabsVoicesSnapshot, ElevenLabsVoicesSnapshotSchema, type MinimaxSystemVoice, MinimaxSystemVoiceSchema, type MinimaxVoicesSnapshot, MinimaxVoicesSnapshotSchema, mapElevenLabsVoice, mapElevenLabsVoices, mapMinimaxVoice, mapMinimaxVoices };