vidspotai-shared 1.0.55 → 1.0.56

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 (222) hide show
  1. package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
  2. package/lib/services/aiGen/providers/google/google.service.js +35 -0
  3. package/lib/utils/errors.d.ts +24 -2
  4. package/lib/utils/errors.d.ts.map +1 -1
  5. package/lib/utils/errors.js +23 -3
  6. package/package.json +1 -1
  7. package/lib/globals/aiModels/providers/alibaba.d.ts +0 -4
  8. package/lib/globals/aiModels/providers/alibaba.d.ts.map +0 -1
  9. package/lib/globals/aiModels/providers/alibaba.js +0 -183
  10. package/lib/globals/aiModels/providers/elevenlabs.d.ts +0 -13
  11. package/lib/globals/aiModels/providers/elevenlabs.d.ts.map +0 -1
  12. package/lib/globals/aiModels/providers/elevenlabs.js +0 -25
  13. package/lib/globals/aiModels/providers/pixverseTemplates.d.ts +0 -36
  14. package/lib/globals/aiModels/providers/pixverseTemplates.d.ts.map +0 -1
  15. package/lib/globals/aiModels/providers/pixverseTemplates.js +0 -42
  16. package/lib/globals/aiModels/tierHelpers.d.ts +0 -27
  17. package/lib/globals/aiModels/tierHelpers.d.ts.map +0 -1
  18. package/lib/globals/aiModels/tierHelpers.js +0 -73
  19. package/lib/globals/ttsModels/providers/minimax.d.ts +0 -8
  20. package/lib/globals/ttsModels/providers/minimax.d.ts.map +0 -1
  21. package/lib/globals/ttsModels/providers/minimax.js +0 -18
  22. package/lib/globals/ttsModels/providers/openai.d.ts +0 -8
  23. package/lib/globals/ttsModels/providers/openai.d.ts.map +0 -1
  24. package/lib/globals/ttsModels/providers/openai.js +0 -18
  25. package/lib/models/agent.model.d.ts +0 -117
  26. package/lib/models/agent.model.d.ts.map +0 -1
  27. package/lib/models/agent.model.js +0 -13
  28. package/lib/models/cachedAsset.model.d.ts +0 -18
  29. package/lib/models/cachedAsset.model.d.ts.map +0 -1
  30. package/lib/models/cachedAsset.model.js +0 -2
  31. package/lib/models/cachedRawAsset.model.d.ts +0 -20
  32. package/lib/models/cachedRawAsset.model.d.ts.map +0 -1
  33. package/lib/models/cachedRawAsset.model.js +0 -2
  34. package/lib/schemas/agentPersona.schema.d.ts +0 -10
  35. package/lib/schemas/agentPersona.schema.d.ts.map +0 -1
  36. package/lib/schemas/agentPersona.schema.js +0 -11
  37. package/lib/schemas/brandKit.schema.d.ts +0 -101
  38. package/lib/schemas/brandKit.schema.d.ts.map +0 -1
  39. package/lib/schemas/brandKit.schema.js +0 -46
  40. package/lib/schemas/brief.schema.d.ts +0 -216
  41. package/lib/schemas/brief.schema.d.ts.map +0 -1
  42. package/lib/schemas/brief.schema.js +0 -118
  43. package/lib/schemas/index.d.ts +0 -6
  44. package/lib/schemas/index.d.ts.map +0 -1
  45. package/lib/schemas/index.js +0 -21
  46. package/lib/schemas/project.schema.d.ts +0 -1005
  47. package/lib/schemas/project.schema.d.ts.map +0 -1
  48. package/lib/schemas/project.schema.js +0 -238
  49. package/lib/schemas/videoPlan.schema.d.ts +0 -145
  50. package/lib/schemas/videoPlan.schema.d.ts.map +0 -1
  51. package/lib/schemas/videoPlan.schema.js +0 -109
  52. package/lib/services/agent/beatSnap.d.ts +0 -10
  53. package/lib/services/agent/beatSnap.d.ts.map +0 -1
  54. package/lib/services/agent/beatSnap.js +0 -128
  55. package/lib/services/agent/costPreflight.d.ts +0 -22
  56. package/lib/services/agent/costPreflight.d.ts.map +0 -1
  57. package/lib/services/agent/costPreflight.js +0 -75
  58. package/lib/services/agent/critic.d.ts +0 -103
  59. package/lib/services/agent/critic.d.ts.map +0 -1
  60. package/lib/services/agent/critic.js +0 -132
  61. package/lib/services/agent/eval/index.d.ts +0 -5
  62. package/lib/services/agent/eval/index.d.ts.map +0 -1
  63. package/lib/services/agent/eval/index.js +0 -20
  64. package/lib/services/agent/eval/judge.d.ts +0 -14
  65. package/lib/services/agent/eval/judge.d.ts.map +0 -1
  66. package/lib/services/agent/eval/judge.js +0 -95
  67. package/lib/services/agent/eval/recorder.d.ts +0 -17
  68. package/lib/services/agent/eval/recorder.d.ts.map +0 -1
  69. package/lib/services/agent/eval/recorder.js +0 -65
  70. package/lib/services/agent/eval/seedBriefs.d.ts +0 -16
  71. package/lib/services/agent/eval/seedBriefs.d.ts.map +0 -1
  72. package/lib/services/agent/eval/seedBriefs.js +0 -1188
  73. package/lib/services/agent/eval/types.d.ts +0 -196
  74. package/lib/services/agent/eval/types.d.ts.map +0 -1
  75. package/lib/services/agent/eval/types.js +0 -65
  76. package/lib/services/agent/executor.d.ts +0 -50
  77. package/lib/services/agent/executor.d.ts.map +0 -1
  78. package/lib/services/agent/executor.js +0 -188
  79. package/lib/services/agent/index.d.ts +0 -15
  80. package/lib/services/agent/index.d.ts.map +0 -1
  81. package/lib/services/agent/index.js +0 -30
  82. package/lib/services/agent/llmCaller.d.ts +0 -77
  83. package/lib/services/agent/llmCaller.d.ts.map +0 -1
  84. package/lib/services/agent/llmCaller.js +0 -16
  85. package/lib/services/agent/llmCallerGateway.d.ts +0 -39
  86. package/lib/services/agent/llmCallerGateway.d.ts.map +0 -1
  87. package/lib/services/agent/llmCallerGateway.js +0 -246
  88. package/lib/services/agent/llmCallerRegistry.d.ts +0 -4
  89. package/lib/services/agent/llmCallerRegistry.d.ts.map +0 -1
  90. package/lib/services/agent/llmCallerRegistry.js +0 -19
  91. package/lib/services/agent/modelRouter.d.ts +0 -41
  92. package/lib/services/agent/modelRouter.d.ts.map +0 -1
  93. package/lib/services/agent/modelRouter.js +0 -57
  94. package/lib/services/agent/musicSelect.d.ts +0 -23
  95. package/lib/services/agent/musicSelect.d.ts.map +0 -1
  96. package/lib/services/agent/musicSelect.js +0 -65
  97. package/lib/services/agent/personas.d.ts +0 -60
  98. package/lib/services/agent/personas.d.ts.map +0 -1
  99. package/lib/services/agent/personas.js +0 -156
  100. package/lib/services/agent/planner.d.ts +0 -56
  101. package/lib/services/agent/planner.d.ts.map +0 -1
  102. package/lib/services/agent/planner.js +0 -237
  103. package/lib/services/agent/toolRegistry.d.ts +0 -64
  104. package/lib/services/agent/toolRegistry.d.ts.map +0 -1
  105. package/lib/services/agent/toolRegistry.js +0 -78
  106. package/lib/services/agent/tools/analyzeReference.tool.d.ts +0 -36
  107. package/lib/services/agent/tools/analyzeReference.tool.d.ts.map +0 -1
  108. package/lib/services/agent/tools/analyzeReference.tool.js +0 -44
  109. package/lib/services/agent/tools/animateImage.tool.d.ts +0 -23
  110. package/lib/services/agent/tools/animateImage.tool.d.ts.map +0 -1
  111. package/lib/services/agent/tools/animateImage.tool.js +0 -58
  112. package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts +0 -30
  113. package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts.map +0 -1
  114. package/lib/services/agent/tools/animateImageWithMotionBrush.tool.js +0 -90
  115. package/lib/services/agent/tools/composeScene.tool.d.ts +0 -948
  116. package/lib/services/agent/tools/composeScene.tool.d.ts.map +0 -1
  117. package/lib/services/agent/tools/composeScene.tool.js +0 -90
  118. package/lib/services/agent/tools/estimateCost.tool.d.ts +0 -342
  119. package/lib/services/agent/tools/estimateCost.tool.d.ts.map +0 -1
  120. package/lib/services/agent/tools/estimateCost.tool.js +0 -62
  121. package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts +0 -32
  122. package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts.map +0 -1
  123. package/lib/services/agent/tools/generateAvatarVideo.tool.js +0 -112
  124. package/lib/services/agent/tools/generateImage.tool.d.ts +0 -28
  125. package/lib/services/agent/tools/generateImage.tool.d.ts.map +0 -1
  126. package/lib/services/agent/tools/generateImage.tool.js +0 -97
  127. package/lib/services/agent/tools/generateVideo.tool.d.ts +0 -30
  128. package/lib/services/agent/tools/generateVideo.tool.d.ts.map +0 -1
  129. package/lib/services/agent/tools/generateVideo.tool.js +0 -84
  130. package/lib/services/agent/tools/generateVoiceover.tool.d.ts +0 -18
  131. package/lib/services/agent/tools/generateVoiceover.tool.d.ts.map +0 -1
  132. package/lib/services/agent/tools/generateVoiceover.tool.js +0 -72
  133. package/lib/services/agent/tools/index.d.ts +0 -19
  134. package/lib/services/agent/tools/index.d.ts.map +0 -1
  135. package/lib/services/agent/tools/index.js +0 -34
  136. package/lib/services/agent/tools/planVideo.tool.d.ts +0 -191
  137. package/lib/services/agent/tools/planVideo.tool.d.ts.map +0 -1
  138. package/lib/services/agent/tools/planVideo.tool.js +0 -46
  139. package/lib/services/agent/tools/render.tool.d.ts +0 -357
  140. package/lib/services/agent/tools/render.tool.d.ts.map +0 -1
  141. package/lib/services/agent/tools/render.tool.js +0 -48
  142. package/lib/services/agent/tools/searchMusic.tool.d.ts +0 -49
  143. package/lib/services/agent/tools/searchMusic.tool.d.ts.map +0 -1
  144. package/lib/services/agent/tools/searchMusic.tool.js +0 -74
  145. package/lib/services/agent/tools/searchStock.tool.d.ts +0 -37
  146. package/lib/services/agent/tools/searchStock.tool.d.ts.map +0 -1
  147. package/lib/services/agent/tools/searchStock.tool.js +0 -101
  148. package/lib/services/agent/tools/searchUserLibrary.tool.d.ts +0 -59
  149. package/lib/services/agent/tools/searchUserLibrary.tool.d.ts.map +0 -1
  150. package/lib/services/agent/tools/searchUserLibrary.tool.js +0 -58
  151. package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts +0 -31
  152. package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts.map +0 -1
  153. package/lib/services/aiGen/canonicalAdapters/cameraControl.types.js +0 -2
  154. package/lib/services/aiGen/canonicalAdapters/index.d.ts +0 -3
  155. package/lib/services/aiGen/canonicalAdapters/index.d.ts.map +0 -1
  156. package/lib/services/aiGen/canonicalAdapters/index.js +0 -18
  157. package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts +0 -23
  158. package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts.map +0 -1
  159. package/lib/services/aiGen/canonicalAdapters/multiShot.types.js +0 -12
  160. package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts +0 -18
  161. package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts.map +0 -1
  162. package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.js +0 -100
  163. package/lib/services/aiGen/providers/fal/falImage.service.d.ts +0 -9
  164. package/lib/services/aiGen/providers/fal/falImage.service.d.ts.map +0 -1
  165. package/lib/services/aiGen/providers/fal/falImage.service.js +0 -102
  166. package/lib/services/aiGen/providers/fal/index.d.ts +0 -2
  167. package/lib/services/aiGen/providers/fal/index.d.ts.map +0 -1
  168. package/lib/services/aiGen/providers/fal/index.js +0 -17
  169. package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts +0 -4
  170. package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts.map +0 -1
  171. package/lib/services/aiGen/providers/kling/cameraAdapter.js +0 -53
  172. package/lib/services/aiGen/providers/pexels/index.d.ts +0 -2
  173. package/lib/services/aiGen/providers/pexels/index.d.ts.map +0 -1
  174. package/lib/services/aiGen/providers/pexels/index.js +0 -17
  175. package/lib/services/aiGen/providers/pexels/pexels.service.d.ts +0 -11
  176. package/lib/services/aiGen/providers/pexels/pexels.service.d.ts.map +0 -1
  177. package/lib/services/aiGen/providers/pexels/pexels.service.js +0 -118
  178. package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts +0 -3
  179. package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts.map +0 -1
  180. package/lib/services/aiGen/providers/runway/cameraAdapter.js +0 -46
  181. package/lib/services/asr/assemblyai.service.d.ts +0 -72
  182. package/lib/services/asr/assemblyai.service.d.ts.map +0 -1
  183. package/lib/services/asr/assemblyai.service.js +0 -89
  184. package/lib/services/asr/index.d.ts +0 -2
  185. package/lib/services/asr/index.d.ts.map +0 -1
  186. package/lib/services/asr/index.js +0 -17
  187. package/lib/services/assetCache.service.d.ts +0 -54
  188. package/lib/services/assetCache.service.d.ts.map +0 -1
  189. package/lib/services/assetCache.service.js +0 -96
  190. package/lib/services/audioAnalysis/index.d.ts +0 -2
  191. package/lib/services/audioAnalysis/index.d.ts.map +0 -1
  192. package/lib/services/audioAnalysis/index.js +0 -17
  193. package/lib/services/audioAnalysis/onsetDetection.service.d.ts +0 -50
  194. package/lib/services/audioAnalysis/onsetDetection.service.d.ts.map +0 -1
  195. package/lib/services/audioAnalysis/onsetDetection.service.js +0 -136
  196. package/lib/services/editor/designToProject.d.ts +0 -60
  197. package/lib/services/editor/designToProject.d.ts.map +0 -1
  198. package/lib/services/editor/designToProject.js +0 -194
  199. package/lib/services/musicGen/index.d.ts +0 -6
  200. package/lib/services/musicGen/index.d.ts.map +0 -1
  201. package/lib/services/musicGen/index.js +0 -26
  202. package/lib/services/musicGen/musicSearchFactory.service.d.ts +0 -14
  203. package/lib/services/musicGen/musicSearchFactory.service.d.ts.map +0 -1
  204. package/lib/services/musicGen/musicSearchFactory.service.js +0 -59
  205. package/lib/services/musicGen/providers/curated.service.d.ts +0 -22
  206. package/lib/services/musicGen/providers/curated.service.d.ts.map +0 -1
  207. package/lib/services/musicGen/providers/curated.service.js +0 -171
  208. package/lib/services/musicGen/providers/jamendo.service.d.ts +0 -8
  209. package/lib/services/musicGen/providers/jamendo.service.d.ts.map +0 -1
  210. package/lib/services/musicGen/providers/jamendo.service.js +0 -93
  211. package/lib/services/musicGen/providers/mubert.service.d.ts +0 -9
  212. package/lib/services/musicGen/providers/mubert.service.d.ts.map +0 -1
  213. package/lib/services/musicGen/providers/mubert.service.js +0 -113
  214. package/lib/services/musicGen/types.d.ts +0 -42
  215. package/lib/services/musicGen/types.d.ts.map +0 -1
  216. package/lib/services/musicGen/types.js +0 -10
  217. package/lib/services/tts/providers/minimax.service.d.ts +0 -14
  218. package/lib/services/tts/providers/minimax.service.d.ts.map +0 -1
  219. package/lib/services/tts/providers/minimax.service.js +0 -78
  220. package/lib/services/tts/providers/openai.service.d.ts +0 -14
  221. package/lib/services/tts/providers/openai.service.d.ts.map +0 -1
  222. package/lib/services/tts/providers/openai.service.js +0 -71
@@ -1,196 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Eval set + replay infrastructure.
4
- *
5
- * The eval harness exists so we can measure agent quality every time we change
6
- * the planner prompt, the model routing, or a tool description — instead of
7
- * shipping blind. Every interactive agent run is also recorded as a trace so it
8
- * can be replayed offline against a candidate change.
9
- *
10
- * 50 hand-curated briefs target launch; a handful of seed briefs ship in code
11
- * so the harness is runnable from day one.
12
- */
13
- /** Rubric axes, scored 0-1 by the judge. */
14
- export declare const EvalRubricSchema: z.ZodObject<{
15
- hookStrength: z.ZodNumber;
16
- voVisualSync: z.ZodNumber;
17
- pacingFit: z.ZodNumber;
18
- brandSafety: z.ZodNumber;
19
- costVsTier: z.ZodNumber;
20
- intentMatch: z.ZodNumber;
21
- }, z.core.$strip>;
22
- export type EvalRubric = z.infer<typeof EvalRubricSchema>;
23
- export declare const EvalBriefSchema: z.ZodObject<{
24
- id: z.ZodString;
25
- niche: z.ZodString;
26
- brief: z.ZodObject<{
27
- rawPrompt: z.ZodString;
28
- goal: z.ZodOptional<z.ZodString>;
29
- niche: z.ZodOptional<z.ZodEnum<{
30
- "ugc-ad": "ugc-ad";
31
- "faceless-yt": "faceless-yt";
32
- "product-demo": "product-demo";
33
- "talking-head": "talking-head";
34
- "social-recap": "social-recap";
35
- "real-estate": "real-estate";
36
- recipe: "recipe";
37
- travel: "travel";
38
- fitness: "fitness";
39
- "podcast-clip": "podcast-clip";
40
- education: "education";
41
- news: "news";
42
- other: "other";
43
- }>>;
44
- audience: z.ZodOptional<z.ZodString>;
45
- tone: z.ZodOptional<z.ZodEnum<{
46
- energetic: "energetic";
47
- calm: "calm";
48
- cinematic: "cinematic";
49
- playful: "playful";
50
- casual: "casual";
51
- professional: "professional";
52
- edgy: "edgy";
53
- warm: "warm";
54
- informational: "informational";
55
- }>>;
56
- hookStyle: z.ZodOptional<z.ZodEnum<{
57
- question: "question";
58
- "bold-claim": "bold-claim";
59
- "pattern-interrupt": "pattern-interrupt";
60
- story: "story";
61
- stat: "stat";
62
- demo: "demo";
63
- "voiceover-only": "voiceover-only";
64
- }>>;
65
- pacing: z.ZodOptional<z.ZodEnum<{
66
- medium: "medium";
67
- fast: "fast";
68
- slow: "slow";
69
- "very-fast": "very-fast";
70
- }>>;
71
- durationSec: z.ZodOptional<z.ZodNumber>;
72
- aspect: z.ZodOptional<z.ZodEnum<{
73
- "9:16": "9:16";
74
- "16:9": "16:9";
75
- "1:1": "1:1";
76
- "4:5": "4:5";
77
- }>>;
78
- voice: z.ZodOptional<z.ZodObject<{
79
- gender: z.ZodOptional<z.ZodEnum<{
80
- female: "female";
81
- male: "male";
82
- neutral: "neutral";
83
- }>>;
84
- ageRange: z.ZodOptional<z.ZodEnum<{
85
- child: "child";
86
- teen: "teen";
87
- "young-adult": "young-adult";
88
- adult: "adult";
89
- senior: "senior";
90
- }>>;
91
- accent: z.ZodOptional<z.ZodString>;
92
- language: z.ZodDefault<z.ZodString>;
93
- voiceId: z.ZodOptional<z.ZodString>;
94
- }, z.core.$strip>>;
95
- music: z.ZodOptional<z.ZodObject<{
96
- moods: z.ZodDefault<z.ZodArray<z.ZodEnum<{
97
- energetic: "energetic";
98
- calm: "calm";
99
- cinematic: "cinematic";
100
- uplifting: "uplifting";
101
- tense: "tense";
102
- dreamy: "dreamy";
103
- dark: "dark";
104
- playful: "playful";
105
- }>>>;
106
- bpmMin: z.ZodOptional<z.ZodNumber>;
107
- bpmMax: z.ZodOptional<z.ZodNumber>;
108
- }, z.core.$strip>>;
109
- cta: z.ZodOptional<z.ZodString>;
110
- claims: z.ZodDefault<z.ZodObject<{
111
- allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
112
- block: z.ZodDefault<z.ZodArray<z.ZodString>>;
113
- }, z.core.$strip>>;
114
- references: z.ZodDefault<z.ZodArray<z.ZodObject<{
115
- url: z.ZodString;
116
- analyzed: z.ZodOptional<z.ZodObject<{
117
- durationMs: z.ZodNumber;
118
- sceneCount: z.ZodNumber;
119
- hookMs: z.ZodNumber;
120
- cutsPerSecond: z.ZodNumber;
121
- bpm: z.ZodOptional<z.ZodNumber>;
122
- transcriptExcerpt: z.ZodOptional<z.ZodString>;
123
- }, z.core.$strip>>;
124
- }, z.core.$strip>>>;
125
- tierBudget: z.ZodDefault<z.ZodEnum<{
126
- T0: "T0";
127
- T1: "T1";
128
- T2: "T2";
129
- T3: "T3";
130
- }>>;
131
- confidence: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
132
- }, z.core.$strip>;
133
- goodOutputNotes: z.ZodString;
134
- }, z.core.$strip>;
135
- export type EvalBrief = z.infer<typeof EvalBriefSchema>;
136
- export declare const ToolCallTraceSchema: z.ZodObject<{
137
- ts: z.ZodNumber;
138
- tool: z.ZodString;
139
- input: z.ZodUnknown;
140
- outcome: z.ZodUnion<readonly [z.ZodObject<{
141
- ok: z.ZodLiteral<true>;
142
- output: z.ZodUnknown;
143
- durationMs: z.ZodNumber;
144
- }, z.core.$strip>, z.ZodObject<{
145
- ok: z.ZodLiteral<false>;
146
- error: z.ZodObject<{
147
- code: z.ZodString;
148
- message: z.ZodString;
149
- }, z.core.$strip>;
150
- durationMs: z.ZodNumber;
151
- }, z.core.$strip>]>;
152
- }, z.core.$strip>;
153
- export type ToolCallTrace = z.infer<typeof ToolCallTraceSchema>;
154
- export declare const AgentRunTraceSchema: z.ZodObject<{
155
- agentRunId: z.ZodString;
156
- briefId: z.ZodOptional<z.ZodString>;
157
- startedAt: z.ZodString;
158
- endedAt: z.ZodOptional<z.ZodString>;
159
- modelRouting: z.ZodRecord<z.ZodString, z.ZodString>;
160
- rngSeed: z.ZodString;
161
- toolCalls: z.ZodArray<z.ZodObject<{
162
- ts: z.ZodNumber;
163
- tool: z.ZodString;
164
- input: z.ZodUnknown;
165
- outcome: z.ZodUnion<readonly [z.ZodObject<{
166
- ok: z.ZodLiteral<true>;
167
- output: z.ZodUnknown;
168
- durationMs: z.ZodNumber;
169
- }, z.core.$strip>, z.ZodObject<{
170
- ok: z.ZodLiteral<false>;
171
- error: z.ZodObject<{
172
- code: z.ZodString;
173
- message: z.ZodString;
174
- }, z.core.$strip>;
175
- durationMs: z.ZodNumber;
176
- }, z.core.$strip>]>;
177
- }, z.core.$strip>>;
178
- }, z.core.$strip>;
179
- export type AgentRunTrace = z.infer<typeof AgentRunTraceSchema>;
180
- export declare const EvalScoreSchema: z.ZodObject<{
181
- briefId: z.ZodString;
182
- agentRunId: z.ZodString;
183
- rubric: z.ZodObject<{
184
- hookStrength: z.ZodNumber;
185
- voVisualSync: z.ZodNumber;
186
- pacingFit: z.ZodNumber;
187
- brandSafety: z.ZodNumber;
188
- costVsTier: z.ZodNumber;
189
- intentMatch: z.ZodNumber;
190
- }, z.core.$strip>;
191
- score: z.ZodNumber;
192
- judgeNotes: z.ZodString;
193
- scoredAt: z.ZodString;
194
- }, z.core.$strip>;
195
- export type EvalScore = z.infer<typeof EvalScoreSchema>;
196
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/eval/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;GAUG;AAEH,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB;;;;;;;iBAQ3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;iBAY9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;iBAS9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;iBAQ1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EvalScoreSchema = exports.AgentRunTraceSchema = exports.ToolCallTraceSchema = exports.EvalBriefSchema = exports.EvalRubricSchema = void 0;
4
- const zod_1 = require("zod");
5
- const brief_schema_1 = require("../../../schemas/brief.schema");
6
- /**
7
- * Eval set + replay infrastructure.
8
- *
9
- * The eval harness exists so we can measure agent quality every time we change
10
- * the planner prompt, the model routing, or a tool description — instead of
11
- * shipping blind. Every interactive agent run is also recorded as a trace so it
12
- * can be replayed offline against a candidate change.
13
- *
14
- * 50 hand-curated briefs target launch; a handful of seed briefs ship in code
15
- * so the harness is runnable from day one.
16
- */
17
- /** Rubric axes, scored 0-1 by the judge. */
18
- exports.EvalRubricSchema = zod_1.z.object({
19
- hookStrength: zod_1.z.number().min(0).max(1),
20
- voVisualSync: zod_1.z.number().min(0).max(1),
21
- pacingFit: zod_1.z.number().min(0).max(1),
22
- brandSafety: zod_1.z.number().min(0).max(1),
23
- costVsTier: zod_1.z.number().min(0).max(1),
24
- /** Did the result actually look like the niche/persona? Catches off-brief drift. */
25
- intentMatch: zod_1.z.number().min(0).max(1),
26
- });
27
- exports.EvalBriefSchema = zod_1.z.object({
28
- id: zod_1.z.string(),
29
- niche: zod_1.z.string(),
30
- brief: brief_schema_1.VideoBriefSchema,
31
- /** Free-form rubric notes the judge prompt prepends — what "good" looks like for THIS brief. */
32
- goodOutputNotes: zod_1.z.string(),
33
- });
34
- exports.ToolCallTraceSchema = zod_1.z.object({
35
- ts: zod_1.z.number(),
36
- tool: zod_1.z.string(),
37
- input: zod_1.z.unknown(),
38
- outcome: zod_1.z.union([
39
- zod_1.z.object({ ok: zod_1.z.literal(true), output: zod_1.z.unknown(), durationMs: zod_1.z.number() }),
40
- zod_1.z.object({
41
- ok: zod_1.z.literal(false),
42
- error: zod_1.z.object({ code: zod_1.z.string(), message: zod_1.z.string() }),
43
- durationMs: zod_1.z.number(),
44
- }),
45
- ]),
46
- });
47
- exports.AgentRunTraceSchema = zod_1.z.object({
48
- agentRunId: zod_1.z.string(),
49
- briefId: zod_1.z.string().optional(),
50
- startedAt: zod_1.z.string().datetime(),
51
- endedAt: zod_1.z.string().datetime().optional(),
52
- modelRouting: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
53
- /** Deterministic RNG seed so re-runs (with the same models + tool stubs) are reproducible. */
54
- rngSeed: zod_1.z.string(),
55
- toolCalls: zod_1.z.array(exports.ToolCallTraceSchema),
56
- });
57
- exports.EvalScoreSchema = zod_1.z.object({
58
- briefId: zod_1.z.string(),
59
- agentRunId: zod_1.z.string(),
60
- rubric: exports.EvalRubricSchema,
61
- /** Weighted aggregate; weights live in the harness. */
62
- score: zod_1.z.number().min(0).max(1),
63
- judgeNotes: zod_1.z.string(),
64
- scoredAt: zod_1.z.string().datetime(),
65
- });
@@ -1,50 +0,0 @@
1
- import { PlannedScene, VideoPlan } from "../../schemas/videoPlan.schema";
2
- import { ToolContext, ToolOutcome } from "./toolRegistry";
3
- export type RunToolFn = <O = unknown>(name: string, input: unknown, ctx: ToolContext) => Promise<ToolOutcome<O>>;
4
- /**
5
- * Executor — turns an approved VideoPlan into per-scene asset results.
6
- *
7
- * Plan-then-execute split (not free-form ReAct): the executor does NOT pick
8
- * tools. The plan dictates which tool runs per scene; the executor only does
9
- * the dispatch + per-scene parallelism + idempotency-key generation.
10
- *
11
- * Returns a SceneOutcome per scene, leaving composition (compose_scene),
12
- * critique (Critic.review), and render to the orchestrator above.
13
- */
14
- export interface SceneAssetResult {
15
- /** Concrete asset URL for the visual track (image or video). */
16
- visualUrl?: string;
17
- /** Voiceover audio (base64 or url depending on host policy). */
18
- voiceoverAudioBase64?: string;
19
- /** Provider task id for async generations the host still needs to poll. */
20
- pendingTaskId?: string;
21
- /** Tool name used. */
22
- tool: string;
23
- /** Idempotency key the executor minted; useful for retries. */
24
- idempotencyKey: string;
25
- }
26
- export interface SceneOutcome {
27
- scene: PlannedScene;
28
- ok: boolean;
29
- result?: SceneAssetResult;
30
- error?: {
31
- code: string;
32
- message: string;
33
- };
34
- durationMs: number;
35
- }
36
- export interface ExecutorOptions {
37
- /** Max scenes to run in parallel. Generation providers rate-limit themselves; this guards on top. */
38
- concurrency?: number;
39
- /** Inject a recording wrapper (e.g. runToolRecorded) for eval / replay. */
40
- runTool?: RunToolFn;
41
- }
42
- export declare class Executor {
43
- private readonly concurrency;
44
- private readonly runTool;
45
- constructor(opts?: ExecutorOptions);
46
- run(plan: VideoPlan, ctx: ToolContext): Promise<SceneOutcome[]>;
47
- private runScene;
48
- private runVisual;
49
- }
50
- //# sourceMappingURL=executor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/services/agent/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAA6B,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,OAAO,EAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,WAAW,KACb,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7B;;;;;;;;;GASG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,YAAY,CAAC;IACpB,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;gBAExB,IAAI,GAAE,eAAoB;IAKhC,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;YAsBvD,QAAQ;YA4CR,SAAS;CAyKxB"}
@@ -1,188 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Executor = void 0;
4
- const toolRegistry_1 = require("./toolRegistry");
5
- class Executor {
6
- constructor(opts = {}) {
7
- this.concurrency = opts.concurrency ?? 4;
8
- this.runTool = opts.runTool ?? toolRegistry_1.runTool;
9
- }
10
- async run(plan, ctx) {
11
- const queue = [...plan.scenes];
12
- const results = new Array(plan.scenes.length);
13
- const workers = [];
14
- let cursor = 0;
15
- const worker = async () => {
16
- while (true) {
17
- const i = cursor++;
18
- if (i >= queue.length)
19
- return;
20
- const scene = queue[i];
21
- results[i] = await this.runScene(scene, ctx, plan.aspect);
22
- }
23
- };
24
- for (let i = 0; i < Math.min(this.concurrency, queue.length); i++) {
25
- workers.push(worker());
26
- }
27
- await Promise.all(workers);
28
- return results;
29
- }
30
- async runScene(scene, ctx, aspect) {
31
- const start = Date.now();
32
- const idempotencyKey = `${ctx.agentRunId}:scene-${scene.sceneIndex}`;
33
- const sceneCtx = { ...ctx, idempotencyKey };
34
- const visualOutcome = await this.runVisual(scene, sceneCtx, aspect);
35
- if (!visualOutcome.ok) {
36
- return {
37
- scene,
38
- ok: false,
39
- error: visualOutcome.error,
40
- durationMs: Date.now() - start,
41
- };
42
- }
43
- let voiceoverAudioBase64;
44
- // talking-head-avatar bakes the VO into the rendered MP4; running TTS again
45
- // here would just waste credits and create a duplicate audio track.
46
- if (scene.voiceoverLine && scene.strategy !== "talking-head-avatar") {
47
- const voOutcome = await this.runTool("generate_voiceover", { text: scene.voiceoverLine }, { ...sceneCtx, idempotencyKey: `${idempotencyKey}:vo` });
48
- if (voOutcome.ok)
49
- voiceoverAudioBase64 = voOutcome.output.audioBase64;
50
- // Don't fail the whole scene on VO miss — host can re-run just the VO.
51
- }
52
- return {
53
- scene,
54
- ok: true,
55
- result: {
56
- ...visualOutcome.output,
57
- voiceoverAudioBase64,
58
- idempotencyKey,
59
- },
60
- durationMs: Date.now() - start,
61
- };
62
- }
63
- async runVisual(scene, ctx, aspect) {
64
- const durationSec = Math.max(2, Math.round(scene.durationMs / 1000));
65
- const wrap = (tool, outcome) => outcome.ok
66
- ? { ok: true, output: { tool, ...outcome.output } }
67
- : { ok: false, error: outcome.error };
68
- switch (scene.strategy) {
69
- case "stock-video":
70
- case "stock-image-ken-burns": {
71
- const out = await this.runTool("search_stock", {
72
- query: scene.prompt,
73
- kind: scene.strategy === "stock-video" ? "video" : "image",
74
- aspectRatio: aspect,
75
- minDurationSec: scene.strategy === "stock-video" ? durationSec : undefined,
76
- }, ctx);
77
- if (!out.ok)
78
- return wrap("search_stock", out);
79
- const url = out.output.assets[0]?.url;
80
- if (!url)
81
- return {
82
- ok: false,
83
- error: { code: "NO_STOCK_RESULTS", message: `No stock results for: ${scene.prompt}` },
84
- };
85
- return { ok: true, output: { tool: "search_stock", visualUrl: url } };
86
- }
87
- case "ai-image-static":
88
- case "ai-image-motion": {
89
- const out = await this.runTool("generate_image", { prompt: scene.prompt, modelKey: scene.preferredModel ?? "fal-flux-1.1-pro" }, ctx);
90
- if (!out.ok)
91
- return wrap("generate_image", out);
92
- return { ok: true, output: { tool: "generate_image", visualUrl: out.output.imageUrl } };
93
- }
94
- case "ai-image-to-video": {
95
- const img = await this.runTool("generate_image", { prompt: scene.prompt }, { ...ctx, idempotencyKey: `${ctx.idempotencyKey}:img` });
96
- if (!img.ok)
97
- return wrap("generate_image", img);
98
- const animate = await this.runTool("animate_image", {
99
- imageUrl: img.output.imageUrl,
100
- motionHint: scene.prompt,
101
- durationSec,
102
- modelKey: scene.preferredModel,
103
- }, ctx);
104
- if (!animate.ok)
105
- return wrap("animate_image", animate);
106
- return {
107
- ok: true,
108
- output: { tool: "animate_image", pendingTaskId: animate.output.taskId },
109
- };
110
- }
111
- case "ai-text-to-video": {
112
- const out = await this.runTool("generate_video", {
113
- prompt: scene.prompt,
114
- modelKey: scene.preferredModel ?? "kling-v2.6",
115
- durationSec,
116
- }, ctx);
117
- if (!out.ok)
118
- return wrap("generate_video", out);
119
- return { ok: true, output: { tool: "generate_video", pendingTaskId: out.output.taskId } };
120
- }
121
- case "user-asset": {
122
- // Per-user library search. The host injects the searcher at boot
123
- // (see userLibrarySearcher bootstrap); if no match, fall back to
124
- // stock so the scene still renders rather than failing hard.
125
- const out = await this.runTool("search_user_library", { query: scene.prompt, limit: 5 }, ctx);
126
- if (out.ok) {
127
- const first = out.output.assets[0];
128
- if (first) {
129
- return { ok: true, output: { tool: "search_user_library", visualUrl: first.url } };
130
- }
131
- }
132
- // No hits or searcher missing — fall back to stock-video as the
133
- // closest cheap substitute so the executor still produces an asset.
134
- const stock = await this.runTool("search_stock", {
135
- query: scene.prompt,
136
- kind: "video",
137
- aspectRatio: aspect,
138
- minDurationSec: durationSec,
139
- }, ctx);
140
- if (!stock.ok)
141
- return wrap("search_stock", stock);
142
- const fallbackUrl = stock.output.assets[0]?.url;
143
- if (!fallbackUrl) {
144
- return {
145
- ok: false,
146
- error: {
147
- code: "USER_ASSET_NO_MATCH",
148
- message: `No user-library match for "${scene.prompt}" and no stock fallback.`,
149
- },
150
- };
151
- }
152
- return { ok: true, output: { tool: "search_user_library", visualUrl: fallbackUrl } };
153
- }
154
- case "talking-head-avatar": {
155
- if (!scene.avatarFaceUrl) {
156
- return {
157
- ok: false,
158
- error: {
159
- code: "AVATAR_FACE_REQUIRED",
160
- message: "talking-head-avatar requires scene.avatarFaceUrl (set on the user's brand kit).",
161
- },
162
- };
163
- }
164
- if (!scene.voiceoverLine) {
165
- return {
166
- ok: false,
167
- error: {
168
- code: "AVATAR_VO_REQUIRED",
169
- message: "talking-head-avatar requires scene.voiceoverLine for the lipsync audio.",
170
- },
171
- };
172
- }
173
- const out = await this.runTool("generate_avatar_video", {
174
- inputImageUrl: scene.avatarFaceUrl,
175
- ttsText: scene.voiceoverLine,
176
- mode: scene.tier === "T3" ? "pro" : "std",
177
- }, ctx);
178
- if (!out.ok)
179
- return wrap("generate_avatar_video", out);
180
- return {
181
- ok: true,
182
- output: { tool: "generate_avatar_video", pendingTaskId: out.output.taskId },
183
- };
184
- }
185
- }
186
- }
187
- }
188
- exports.Executor = Executor;
@@ -1,15 +0,0 @@
1
- export * from "./toolRegistry";
2
- export * from "./tools";
3
- export * from "./modelRouter";
4
- export * from "./llmCaller";
5
- export * from "./llmCallerGateway";
6
- export * from "./personas";
7
- export * from "./llmCallerRegistry";
8
- export * from "./costPreflight";
9
- export * from "./planner";
10
- export * from "./beatSnap";
11
- export * from "./musicSelect";
12
- export * from "./executor";
13
- export * from "./critic";
14
- export * from "./eval";
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/agent/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./toolRegistry"), exports);
18
- __exportStar(require("./tools"), exports);
19
- __exportStar(require("./modelRouter"), exports);
20
- __exportStar(require("./llmCaller"), exports);
21
- __exportStar(require("./llmCallerGateway"), exports);
22
- __exportStar(require("./personas"), exports);
23
- __exportStar(require("./llmCallerRegistry"), exports);
24
- __exportStar(require("./costPreflight"), exports);
25
- __exportStar(require("./planner"), exports);
26
- __exportStar(require("./beatSnap"), exports);
27
- __exportStar(require("./musicSelect"), exports);
28
- __exportStar(require("./executor"), exports);
29
- __exportStar(require("./critic"), exports);
30
- __exportStar(require("./eval"), exports);
@@ -1,77 +0,0 @@
1
- import { z } from "zod";
2
- import { ModelChoice } from "./modelRouter";
3
- /**
4
- * Provider-agnostic LLM caller. The host (Express server / Firebase Functions)
5
- * wires a concrete implementation backed by Vercel AI Gateway, OpenRouter, or
6
- * direct SDKs. Agent code only ever sees this interface, which keeps it
7
- * portable and lets us A/B-test models against the eval set without code changes.
8
- */
9
- export interface LlmCaller {
10
- /** Free-form chat completion. */
11
- chat(req: ChatRequest): Promise<ChatResponse>;
12
- /** Structured-output completion: result is validated against the provided Zod schema. */
13
- structured<T extends z.ZodTypeAny>(req: StructuredRequest<T>): Promise<StructuredResponse<T>>;
14
- /**
15
- * Streaming structured completion. Returns an async iterable of raw text
16
- * chunks AND a final promise that resolves to the validated structured
17
- * response. Callers typically forward the chunks to a UI channel (SSE)
18
- * for token-by-token rendering and await `result` for the parsed payload.
19
- *
20
- * Implementations that don't natively support streaming may fall back to
21
- * a single chunk emission of the full text — the contract is unchanged.
22
- */
23
- structuredStream?<T extends z.ZodTypeAny>(req: StructuredRequest<T>): {
24
- tokens: AsyncIterable<string>;
25
- result: Promise<StructuredResponse<T>>;
26
- };
27
- }
28
- export interface ChatMessage {
29
- role: "system" | "user" | "assistant";
30
- content: string;
31
- /** Optional inline images for vision-capable models. */
32
- imageUrls?: string[];
33
- }
34
- export interface ChatRequest {
35
- model: ModelChoice;
36
- messages: ChatMessage[];
37
- temperature?: number;
38
- maxTokens?: number;
39
- /** Stop sequences. */
40
- stop?: string[];
41
- }
42
- export interface ChatResponse {
43
- text: string;
44
- /** Token counts when reported by the provider. */
45
- usage?: {
46
- promptTokens?: number;
47
- completionTokens?: number;
48
- };
49
- /** Provider request id, for tracing/replay. */
50
- requestId?: string;
51
- }
52
- export interface StructuredRequest<T extends z.ZodTypeAny> {
53
- model: ModelChoice;
54
- messages: ChatMessage[];
55
- schema: T;
56
- /** Human-readable schema name shown to the model in the prompt. */
57
- schemaName: string;
58
- temperature?: number;
59
- maxTokens?: number;
60
- }
61
- export interface StructuredResponse<T extends z.ZodTypeAny> {
62
- data: z.infer<T>;
63
- usage?: {
64
- promptTokens?: number;
65
- completionTokens?: number;
66
- };
67
- requestId?: string;
68
- }
69
- /**
70
- * Stub LlmCaller for tests and offline development. Throws if anyone calls it
71
- * without the host having injected a real implementation.
72
- */
73
- export declare class UnconfiguredLlmCaller implements LlmCaller {
74
- chat(): Promise<ChatResponse>;
75
- structured<T extends z.ZodTypeAny>(): Promise<StructuredResponse<T>>;
76
- }
77
- //# sourceMappingURL=llmCaller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"llmCaller.d.ts","sourceRoot":"","sources":["../../../src/services/agent/llmCaller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,iCAAiC;IACjC,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE9C,yFAAyF;IACzF,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAC/B,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,GACxB,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IAElC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EACtC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,GACxB;QACD,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAC9B,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;KACxC,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU;IACvD,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC;IACV,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU;IACxD,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,KAAK,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,SAAS;IACrD,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC;IAK7B,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAKrE"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnconfiguredLlmCaller = void 0;
4
- /**
5
- * Stub LlmCaller for tests and offline development. Throws if anyone calls it
6
- * without the host having injected a real implementation.
7
- */
8
- class UnconfiguredLlmCaller {
9
- chat() {
10
- throw new Error("LlmCaller not configured. Inject a concrete implementation at host boot.");
11
- }
12
- structured() {
13
- throw new Error("LlmCaller not configured. Inject a concrete implementation at host boot.");
14
- }
15
- }
16
- exports.UnconfiguredLlmCaller = UnconfiguredLlmCaller;