@triplef/agent 1.0.1 → 1.0.2

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.
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export { E as EncyclopediaDocumentInput, a as EncyclopediaDocumentResult, b as EncyclopediaSearchHit, c as EncyclopediaSearchInput } from '../encyclopedia-search.model-oFW8_rUT.js';
3
- export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, E as ENCYCLOPEDIA_TOOL_NAMES, F as FormatZodShapeOptions, a as IMAGE_TASK_TEMPLATES, b as ImageTaskTemplate, I as IntentResult, c as IntentSchema, M as MEMORY_TOOL_NAMES, P as ProviderConfig, d as TOOL_DESCRIPTIONS, e as TOOL_NAMES, T as TemplateName, f as ToolName, g as VARIANT_NAMES, V as VariantName, h as formatZodShape, i as isImageTaskTemplate } from '../format-zod-shape.helper-BQtOJfG6.js';
3
+ import { F as FormatZodShapeOptions } from '../format-zod-shape.types-loN2xakw.js';
4
+ export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, E as ENCYCLOPEDIA_TOOL_NAMES, a as IMAGE_TASK_TEMPLATES, b as ImageTaskTemplate, I as IntentResult, c as IntentSchema, M as MEMORY_TOOL_NAMES, d as TOOL_DESCRIPTIONS, e as TOOL_NAMES, T as TemplateName, f as ToolName, g as VARIANT_NAMES, V as VariantName, i as isImageTaskTemplate } from '../format-zod-shape.types-loN2xakw.js';
4
5
 
5
6
  declare const BLOCKED_IMAGE_HOSTS: Set<string>;
6
7
 
@@ -62,8 +63,101 @@ interface EncyclopediaSelectResult {
62
63
 
63
64
  declare function categorizeTools(toolNames: readonly string[]): Record<string, string[]>;
64
65
 
66
+ type ProviderConfig = {
67
+ serper: {
68
+ enabled: boolean;
69
+ apiKey?: string;
70
+ web: {
71
+ enabled: boolean;
72
+ };
73
+ images: {
74
+ enabled: boolean;
75
+ };
76
+ news: {
77
+ enabled: boolean;
78
+ };
79
+ places: {
80
+ enabled: boolean;
81
+ };
82
+ shopping: {
83
+ enabled: boolean;
84
+ };
85
+ reviews: {
86
+ enabled: boolean;
87
+ };
88
+ videos: {
89
+ enabled: boolean;
90
+ };
91
+ scrape: {
92
+ enabled: boolean;
93
+ };
94
+ };
95
+ youtube: {
96
+ enabled: boolean;
97
+ apiKey?: string;
98
+ videos: {
99
+ enabled: boolean;
100
+ };
101
+ };
102
+ brightData: {
103
+ enabled: boolean;
104
+ apiKey?: string;
105
+ web: {
106
+ enabled: boolean;
107
+ };
108
+ images: {
109
+ enabled: boolean;
110
+ };
111
+ news: {
112
+ enabled: boolean;
113
+ };
114
+ places: {
115
+ enabled: boolean;
116
+ };
117
+ shopping: {
118
+ enabled: boolean;
119
+ };
120
+ videos: {
121
+ enabled: boolean;
122
+ };
123
+ scrape: {
124
+ enabled: boolean;
125
+ };
126
+ };
127
+ eodhd: {
128
+ enabled: boolean;
129
+ apiKey?: string;
130
+ search: {
131
+ enabled: boolean;
132
+ };
133
+ quote: {
134
+ enabled: boolean;
135
+ };
136
+ history: {
137
+ enabled: boolean;
138
+ };
139
+ technical: {
140
+ enabled: boolean;
141
+ };
142
+ intraday: {
143
+ enabled: boolean;
144
+ };
145
+ news: {
146
+ enabled: boolean;
147
+ };
148
+ fundamentals: {
149
+ enabled: boolean;
150
+ };
151
+ };
152
+ playwright: {
153
+ enabled: boolean;
154
+ };
155
+ };
156
+
65
157
  declare function hasBlockedImageHost(url: string): boolean;
66
158
 
159
+ declare function isAbsoluteHttpUrl(value: string): boolean;
160
+
67
161
  declare function isPrivateOrLocalhost(hostname: string): boolean;
68
162
 
69
163
  declare function isTrustedImageUrl(url: string): boolean;
@@ -72,21 +166,25 @@ declare function isTrustedUrl(url: string, options?: {
72
166
  allowPrivate?: boolean;
73
167
  }): boolean;
74
168
 
169
+ declare function safeMediaUrl(message?: string | {
170
+ message: string;
171
+ }): z.ZodString;
172
+
173
+ declare function safeMediaUrlOrEmpty(message?: string | {
174
+ message: string;
175
+ }): z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
176
+
75
177
  declare function safeUrl(message?: string | {
76
178
  message: string;
77
179
  }): z.ZodString;
180
+
78
181
  declare function safeVideoUrl(message?: string | {
79
182
  message: string;
80
183
  }): z.ZodString;
184
+
81
185
  declare function safeVideoUrlOrEmpty(message?: string | {
82
186
  message: string;
83
187
  }): z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
84
- declare function safeMediaUrl(message?: string | {
85
- message: string;
86
- }): z.ZodString;
87
- declare function safeMediaUrlOrEmpty(message?: string | {
88
- message: string;
89
- }): z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
90
188
 
91
189
  declare function deriveSchemaKeys(schema: z.ZodType): {
92
190
  required: string[];
@@ -95,6 +193,20 @@ declare function deriveSchemaKeys(schema: z.ZodType): {
95
193
 
96
194
  declare function formatZodIssues(issues: z.ZodIssue[]): string;
97
195
 
196
+ declare function formatZodShape(schema: z.ZodType, options?: FormatZodShapeOptions): string;
197
+
198
+ declare function clampCognitionLimit(value: number): number;
199
+
200
+ declare function clampEpisodeProbeLimit(value: number): number;
201
+
202
+ declare function clampEpisodeRecencyMidpoint(value: number): number;
203
+
204
+ declare function clampEpisodeRecencyScaleSeconds(value: number): number;
205
+
206
+ declare function clampEpisodeRecencyWeight(value: number): number;
207
+
208
+ declare function clampEpisodeScoreThreshold(value: number): number;
209
+
98
210
  declare const MemoryClusterSummarySchema: z.ZodObject<{
99
211
  title: z.ZodString;
100
212
  summary: z.ZodString;
@@ -210,14 +322,11 @@ declare const memoryCognitionProfileSchema: z.ZodObject<{
210
322
  corrections: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
211
323
  }, z.core.$strip>;
212
324
  type MemoryCognitionProfile = z.infer<typeof memoryCognitionProfileSchema>;
213
- declare function isAllFieldsNullWipe(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): boolean;
214
- declare function parseStoredProfile(text: string | undefined): MemoryCognitionProfile;
215
325
  declare const memoryProfileInsightSchema: z.ZodObject<{
216
326
  text: z.ZodString;
217
327
  path: z.ZodOptional<z.ZodString>;
218
328
  }, z.core.$strip>;
219
329
  type MemoryProfileInsight = z.infer<typeof memoryProfileInsightSchema>;
220
- declare function normalizeInsightPath(path: string | undefined): string | undefined;
221
330
  declare const memoryProfileResponseSchema: z.ZodPreprocess<z.ZodObject<{
222
331
  profile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
223
332
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -254,6 +363,9 @@ declare const memoryProfileResponseSchema: z.ZodPreprocess<z.ZodObject<{
254
363
  episode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
364
  }, z.core.$strip>, unknown>;
256
365
  type MemoryProfileResponse = z.infer<typeof memoryProfileResponseSchema>;
366
+
367
+ declare function isAllFieldsNullWipe(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): boolean;
368
+
257
369
  declare const INSIGHT_TAGS: string[];
258
370
  declare const EPISODE_TAGS: string[];
259
371
  declare const CONVICTION_TAGS: string[];
@@ -265,7 +377,6 @@ declare const CONVICTION_TEXT_LIMIT = 500;
265
377
  declare const EPISODE_TEXT_LIMIT = 500;
266
378
  declare const INSIGHTS_MAX_PER_TURN = 8;
267
379
  declare const COGNITION_PURGE_BATCH = 500;
268
- declare function clampCognitionLimit(value: number): number;
269
380
  declare const EPISODE_RECENCY_WEIGHT_DEFAULT = 0.3;
270
381
  declare const EPISODE_RECENCY_SCALE_SECONDS_DEFAULT: number;
271
382
  declare const EPISODE_RECENCY_MIDPOINT_DEFAULT = 0.5;
@@ -280,22 +391,23 @@ declare const EPISODE_RECENCY_MIDPOINT_MAX = 0.99;
280
391
  declare const EPISODE_PROBE_LIMIT_MIN = 0;
281
392
  declare const EPISODE_SCORE_THRESHOLD_MIN = 0;
282
393
  declare const EPISODE_SCORE_THRESHOLD_MAX = 1;
283
- declare function clampEpisodeRecencyWeight(value: number): number;
284
- declare function clampEpisodeRecencyScaleSeconds(value: number): number;
285
- declare function clampEpisodeRecencyMidpoint(value: number): number;
286
- declare function clampEpisodeProbeLimit(value: number): number;
287
- declare function clampEpisodeScoreThreshold(value: number): number;
288
394
 
289
395
  interface MergedCognitionProfile {
290
396
  profile?: MemoryCognitionProfile;
291
397
  removals: string[];
292
398
  }
399
+
293
400
  declare function mergeCognitionProfiles(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): MergedCognitionProfile;
294
401
 
402
+ declare function normalizeInsightPath(path: string | undefined): string | undefined;
403
+
404
+ declare function parseStoredProfile(text: string | undefined): MemoryCognitionProfile;
405
+
295
406
  interface PruneProfileTopicOutcome {
296
407
  profile: MemoryCognitionProfile;
297
408
  removed?: string;
298
409
  }
410
+
299
411
  declare function pruneProfileTopic(profile: MemoryCognitionProfile, path: string): PruneProfileTopicOutcome;
300
412
 
301
413
  declare const ResearchFrictionQueryDecisionSchema: z.ZodObject<{
@@ -948,4 +1060,4 @@ declare const videolistSchema: z.ZodObject<{
948
1060
  }, z.core.$strip>>>;
949
1061
  }, z.core.$strip>;
950
1062
 
951
- export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, type ConsolidationVerdict, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, type EncyclopediaClassification, EncyclopediaClassifySchema, type EncyclopediaIngestTriage, type EncyclopediaIngestTriageDecision, EncyclopediaIngestTriageDecisionSchema, EncyclopediaIngestTriageSchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, MORE_MEDIA_COUNT, type MemoryClusterSummary, MemoryClusterSummarySchema, type MemoryCognitionProfile, type MemoryEnrichment, MemoryEnrichmentSchema, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, type MergedCognitionProfile, NON_PAGE_EXTENSIONS, type PruneProfileTopicOutcome, type ResearchFrictionQuery, type ResearchFrictionQueryDecision, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, type ResearchTriage, type ResearchTriageDecision, ResearchTriageDecisionSchema, ResearchTriageSchema, TAXONOMY_ICON_ALLOWLIST, type TaxonomyIconName, type TaxonomyPairVerdict, TaxonomyPairVerdictSchema, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
1063
+ export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, type ConsolidationVerdict, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, type EncyclopediaClassification, EncyclopediaClassifySchema, type EncyclopediaIngestTriage, type EncyclopediaIngestTriageDecision, EncyclopediaIngestTriageDecisionSchema, EncyclopediaIngestTriageSchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, FormatZodShapeOptions, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, MORE_MEDIA_COUNT, type MemoryClusterSummary, MemoryClusterSummarySchema, type MemoryCognitionProfile, type MemoryEnrichment, MemoryEnrichmentSchema, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, type MergedCognitionProfile, NON_PAGE_EXTENSIONS, type ProviderConfig, type PruneProfileTopicOutcome, type ResearchFrictionQuery, type ResearchFrictionQueryDecision, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, type ResearchTriage, type ResearchTriageDecision, ResearchTriageDecisionSchema, ResearchTriageSchema, TAXONOMY_ICON_ALLOWLIST, type TaxonomyIconName, type TaxonomyPairVerdict, TaxonomyPairVerdictSchema, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAbsoluteHttpUrl, isAllFieldsNullWipe, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { merge, omit } from '@triplef/helpers/object-io';
3
3
 
4
- // src/schemas/constants/blocked-image-hosts.ts
4
+ // src/schemas/constants/blocked-image-hosts.constant.ts
5
5
  var BLOCKED_IMAGE_HOSTS = /* @__PURE__ */ new Set([
6
6
  // Google thumbnail proxies (low-res, frequently 404 when hot-linked)
7
7
  "encrypted-tbn0.gstatic.com",
@@ -39,7 +39,7 @@ var EMBEDDABLE_VIDEO_PROVIDER_CLAUSE = `Only return URLs from supported embeddab
39
39
  var DEFAULT_MEDIA_COUNT = 6;
40
40
  var MORE_MEDIA_COUNT = 12;
41
41
 
42
- // src/schemas/constants/url-trust.constants.ts
42
+ // src/schemas/constants/url-trust.constant.ts
43
43
  var BLOCKED_URL_HOSTS = /* @__PURE__ */ new Set([
44
44
  // Google thumbnail / static asset proxies
45
45
  "encrypted-tbn0.gstatic.com",
@@ -124,7 +124,7 @@ function categorizeTools(toolNames) {
124
124
  return cats;
125
125
  }
126
126
 
127
- // src/schemas/helpers/tools/tool-registry.constants.ts
127
+ // src/schemas/helpers/tools/tool-registry.constant.ts
128
128
  var VARIANT_NAMES = ["grayscale", "denoised", "sharpened", "clahe"];
129
129
  var TOOL_DESCRIPTIONS = {
130
130
  brightDataWebSearch: "Search the web using Bright Data SERP API (Google). Returns organic results with titles, snippets, and links. Supports an optional recency window (day/week/month/year) for fresh results.",
@@ -253,6 +253,16 @@ function hasBlockedImageHost(url) {
253
253
  return BLOCKED_IMAGE_HOSTS.has(parsed.hostname.toLowerCase());
254
254
  }
255
255
 
256
+ // src/schemas/helpers/url-trust/is-absolute-http-url.helper.ts
257
+ function isAbsoluteHttpUrl(value) {
258
+ try {
259
+ const protocol = new URL(value).protocol;
260
+ return protocol === "http:" || protocol === "https:";
261
+ } catch {
262
+ return false;
263
+ }
264
+ }
265
+
256
266
  // src/schemas/helpers/url-trust/is-private-or-localhost.helper.ts
257
267
  function isPrivateOrLocalhost(hostname) {
258
268
  const lower = hostname.toLowerCase();
@@ -368,21 +378,20 @@ function isTrustedUrl(url, options = {}) {
368
378
  }
369
379
  return true;
370
380
  }
381
+ var LOCAL_STORAGE_URL_PATTERN = /^\/api\/v1\/storage\/[A-Za-z0-9_-]+\/[A-Za-z0-9_-]+\/[A-Za-z0-9]+$/;
382
+ function safeMediaUrl(message = "must be a safe media URL") {
383
+ const text = typeof message === "string" ? message : message.message;
384
+ return z.string().refine((value) => LOCAL_STORAGE_URL_PATTERN.test(value) || isAbsoluteHttpUrl(value), { message: text });
385
+ }
386
+ function safeMediaUrlOrEmpty(message = "must be a safe media URL") {
387
+ return safeMediaUrl(message).optional().or(z.literal(""));
388
+ }
371
389
  function safeUrl(message = "must be a safe URL") {
372
390
  const text = typeof message === "string" ? message : message.message;
373
391
  return z.string().url({ message: "must be a valid URL" }).refine((value) => isTrustedUrl(value, { allowPrivate: false }), {
374
392
  message: text
375
393
  });
376
394
  }
377
- var LOCAL_STORAGE_URL_PATTERN = /^\/api\/v1\/storage\/[A-Za-z0-9_-]+\/[A-Za-z0-9_-]+\/[A-Za-z0-9]+$/;
378
- function isAbsoluteHttpUrl(value) {
379
- try {
380
- const protocol = new URL(value).protocol;
381
- return protocol === "http:" || protocol === "https:";
382
- } catch {
383
- return false;
384
- }
385
- }
386
395
  function safeVideoUrl(message = "must be a safe video URL") {
387
396
  const text = typeof message === "string" ? message : message.message;
388
397
  return z.string().refine(isAbsoluteHttpUrl, { message: text });
@@ -390,13 +399,6 @@ function safeVideoUrl(message = "must be a safe video URL") {
390
399
  function safeVideoUrlOrEmpty(message = "must be a safe video URL") {
391
400
  return safeVideoUrl(message).optional().or(z.literal(""));
392
401
  }
393
- function safeMediaUrl(message = "must be a safe media URL") {
394
- const text = typeof message === "string" ? message : message.message;
395
- return z.string().refine((value) => LOCAL_STORAGE_URL_PATTERN.test(value) || isAbsoluteHttpUrl(value), { message: text });
396
- }
397
- function safeMediaUrlOrEmpty(message = "must be a safe media URL") {
398
- return safeMediaUrl(message).optional().or(z.literal(""));
399
- }
400
402
  function deriveSchemaKeys(schema) {
401
403
  const jsonSchema = z.toJSONSchema(schema);
402
404
  const properties = jsonSchema.properties ?? {};
@@ -515,6 +517,69 @@ var IntentSchema = z.object({
515
517
  images: ImagePlanSchema.optional().describe("Image processing plan. Only present when images are attached.")
516
518
  }).default({}).describe("Execution plan for the response step.")
517
519
  });
520
+
521
+ // src/schemas/memory/memory-cognition.constant.ts
522
+ var INSIGHT_TAGS = ["cognition", "insight"];
523
+ var EPISODE_TAGS = ["cognition", "episode"];
524
+ var CONVICTION_TAGS = ["cognition", "conviction"];
525
+ var COGNITION_LIMIT_DEFAULT = 5e3;
526
+ var COGNITION_LIMIT_MIN = 500;
527
+ var COGNITION_LIMIT_MAX = 32e3;
528
+ var INSIGHT_TEXT_LIMIT = 500;
529
+ var CONVICTION_TEXT_LIMIT = 500;
530
+ var EPISODE_TEXT_LIMIT = 500;
531
+ var INSIGHTS_MAX_PER_TURN = 8;
532
+ var COGNITION_PURGE_BATCH = 500;
533
+ var EPISODE_RECENCY_WEIGHT_DEFAULT = 0.3;
534
+ var EPISODE_RECENCY_SCALE_SECONDS_DEFAULT = 7 * 24 * 60 * 60;
535
+ var EPISODE_RECENCY_MIDPOINT_DEFAULT = 0.5;
536
+ var EPISODE_PROBE_LIMIT_DEFAULT = 3;
537
+ var EPISODE_SCORE_THRESHOLD_DEFAULT = 0.1;
538
+ var EPISODE_RECENCY_WEIGHT_MIN = 0;
539
+ var EPISODE_RECENCY_WEIGHT_MAX = 1;
540
+ var EPISODE_RECENCY_SCALE_SECONDS_MIN = 60;
541
+ var EPISODE_RECENCY_SCALE_SECONDS_MAX = 31536e3;
542
+ var EPISODE_RECENCY_MIDPOINT_MIN = 0.01;
543
+ var EPISODE_RECENCY_MIDPOINT_MAX = 0.99;
544
+ var EPISODE_PROBE_LIMIT_MIN = 0;
545
+ var EPISODE_SCORE_THRESHOLD_MIN = 0;
546
+ var EPISODE_SCORE_THRESHOLD_MAX = 1;
547
+
548
+ // src/schemas/memory/clamp-cognition-limit.helper.ts
549
+ function clampCognitionLimit(value) {
550
+ if (!Number.isFinite(value)) return COGNITION_LIMIT_DEFAULT;
551
+ return Math.min(COGNITION_LIMIT_MAX, Math.max(COGNITION_LIMIT_MIN, Math.trunc(value)));
552
+ }
553
+
554
+ // src/schemas/memory/clamp-episode-probe-limit.helper.ts
555
+ function clampEpisodeProbeLimit(value) {
556
+ if (!Number.isFinite(value)) return EPISODE_PROBE_LIMIT_DEFAULT;
557
+ return Math.max(EPISODE_PROBE_LIMIT_MIN, Math.trunc(value));
558
+ }
559
+
560
+ // src/schemas/memory/clamp-episode-recency-midpoint.helper.ts
561
+ function clampEpisodeRecencyMidpoint(value) {
562
+ if (!Number.isFinite(value)) return EPISODE_RECENCY_MIDPOINT_DEFAULT;
563
+ return Math.min(EPISODE_RECENCY_MIDPOINT_MAX, Math.max(EPISODE_RECENCY_MIDPOINT_MIN, value));
564
+ }
565
+
566
+ // src/schemas/memory/clamp-episode-recency-scale-seconds.helper.ts
567
+ function clampEpisodeRecencyScaleSeconds(value) {
568
+ if (!Number.isFinite(value)) return EPISODE_RECENCY_SCALE_SECONDS_DEFAULT;
569
+ return Math.min(EPISODE_RECENCY_SCALE_SECONDS_MAX, Math.max(EPISODE_RECENCY_SCALE_SECONDS_MIN, Math.trunc(value)));
570
+ }
571
+
572
+ // src/schemas/memory/clamp-episode-recency-weight.helper.ts
573
+ function clampEpisodeRecencyWeight(value) {
574
+ if (!Number.isFinite(value)) return EPISODE_RECENCY_WEIGHT_DEFAULT;
575
+ return Math.min(EPISODE_RECENCY_WEIGHT_MAX, Math.max(EPISODE_RECENCY_WEIGHT_MIN, value));
576
+ }
577
+
578
+ // src/schemas/memory/clamp-episode-score-threshold.helper.ts
579
+ function clampEpisodeScoreThreshold(value) {
580
+ if (!Number.isFinite(value)) return EPISODE_SCORE_THRESHOLD_DEFAULT;
581
+ return Math.min(EPISODE_SCORE_THRESHOLD_MAX, Math.max(EPISODE_SCORE_THRESHOLD_MIN, value));
582
+ }
518
583
  var MemoryClusterSummarySchema = z.object({
519
584
  title: z.string().describe('A short noun-phrase label for the cluster (2\u20136 words), e.g. "gaming preferences" or "work projects".'),
520
585
  summary: z.string().describe(
@@ -632,6 +697,18 @@ var ExtractionSchema = z.object({
632
697
  */
633
698
  community: z.string().optional()
634
699
  });
700
+
701
+ // src/schemas/memory/is-all-fields-null-wipe.helper.ts
702
+ function isAllFieldsNullWipe(current, patch) {
703
+ if (!current) return false;
704
+ const currentKeys = Object.keys(current);
705
+ if (currentKeys.length === 0) return false;
706
+ const patchRecord = patch;
707
+ const presentKeys = Object.keys(patchRecord);
708
+ if (presentKeys.length === 0) return false;
709
+ const nullKeys = presentKeys.filter((key) => patchRecord[key] === null || patchRecord[key] === void 0);
710
+ return nullKeys.length === presentKeys.length && currentKeys.every((key) => nullKeys.includes(key));
711
+ }
635
712
  var nullishText = z.string().nullish();
636
713
  var nullishTopics = z.array(z.string()).nullish();
637
714
  var memoryCognitionProfileSchema = z.object({
@@ -688,42 +765,10 @@ var memoryCognitionProfileSchema = z.object({
688
765
  */
689
766
  corrections: z.record(z.string(), z.string()).nullish()
690
767
  });
691
- function isAllFieldsNullWipe(current, patch) {
692
- if (!current) return false;
693
- const currentKeys = Object.keys(current);
694
- if (currentKeys.length === 0) return false;
695
- const patchRecord = patch;
696
- const presentKeys = Object.keys(patchRecord);
697
- if (presentKeys.length === 0) return false;
698
- const nullKeys = presentKeys.filter((key) => patchRecord[key] === null || patchRecord[key] === void 0);
699
- return nullKeys.length === presentKeys.length && currentKeys.every((key) => nullKeys.includes(key));
700
- }
701
- function parseStoredProfile(text) {
702
- if (!text?.trim()) return {};
703
- try {
704
- const parsed = JSON.parse(text);
705
- return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
706
- } catch {
707
- return {};
708
- }
709
- }
710
768
  var memoryProfileInsightSchema = z.object({
711
769
  text: z.string(),
712
770
  path: z.string().optional()
713
771
  });
714
- function normalizePathSegment(segment) {
715
- return segment.trim().toLowerCase().replace(/\s+/g, "-");
716
- }
717
- function normalizeInsightPath(path) {
718
- const trimmed = path?.trim();
719
- if (!trimmed) return void 0;
720
- const dot = trimmed.indexOf(".");
721
- if (dot <= 0) return void 0;
722
- const field = normalizePathSegment(trimmed.slice(0, dot));
723
- const keyword = normalizePathSegment(trimmed.slice(dot + 1));
724
- if (!field || !keyword) return void 0;
725
- return `${field}.${keyword}`;
726
- }
727
772
  var memoryProfileResponseSchema = z.preprocess(
728
773
  (value) => {
729
774
  if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
@@ -745,55 +790,6 @@ var memoryProfileResponseSchema = z.preprocess(
745
790
  episode: z.string().nullish()
746
791
  })
747
792
  );
748
- var INSIGHT_TAGS = ["cognition", "insight"];
749
- var EPISODE_TAGS = ["cognition", "episode"];
750
- var CONVICTION_TAGS = ["cognition", "conviction"];
751
- var COGNITION_LIMIT_DEFAULT = 5e3;
752
- var COGNITION_LIMIT_MIN = 500;
753
- var COGNITION_LIMIT_MAX = 32e3;
754
- var INSIGHT_TEXT_LIMIT = 500;
755
- var CONVICTION_TEXT_LIMIT = 500;
756
- var EPISODE_TEXT_LIMIT = 500;
757
- var INSIGHTS_MAX_PER_TURN = 8;
758
- var COGNITION_PURGE_BATCH = 500;
759
- function clampCognitionLimit(value) {
760
- if (!Number.isFinite(value)) return COGNITION_LIMIT_DEFAULT;
761
- return Math.min(COGNITION_LIMIT_MAX, Math.max(COGNITION_LIMIT_MIN, Math.trunc(value)));
762
- }
763
- var EPISODE_RECENCY_WEIGHT_DEFAULT = 0.3;
764
- var EPISODE_RECENCY_SCALE_SECONDS_DEFAULT = 7 * 24 * 60 * 60;
765
- var EPISODE_RECENCY_MIDPOINT_DEFAULT = 0.5;
766
- var EPISODE_PROBE_LIMIT_DEFAULT = 3;
767
- var EPISODE_SCORE_THRESHOLD_DEFAULT = 0.1;
768
- var EPISODE_RECENCY_WEIGHT_MIN = 0;
769
- var EPISODE_RECENCY_WEIGHT_MAX = 1;
770
- var EPISODE_RECENCY_SCALE_SECONDS_MIN = 60;
771
- var EPISODE_RECENCY_SCALE_SECONDS_MAX = 31536e3;
772
- var EPISODE_RECENCY_MIDPOINT_MIN = 0.01;
773
- var EPISODE_RECENCY_MIDPOINT_MAX = 0.99;
774
- var EPISODE_PROBE_LIMIT_MIN = 0;
775
- var EPISODE_SCORE_THRESHOLD_MIN = 0;
776
- var EPISODE_SCORE_THRESHOLD_MAX = 1;
777
- function clampEpisodeRecencyWeight(value) {
778
- if (!Number.isFinite(value)) return EPISODE_RECENCY_WEIGHT_DEFAULT;
779
- return Math.min(EPISODE_RECENCY_WEIGHT_MAX, Math.max(EPISODE_RECENCY_WEIGHT_MIN, value));
780
- }
781
- function clampEpisodeRecencyScaleSeconds(value) {
782
- if (!Number.isFinite(value)) return EPISODE_RECENCY_SCALE_SECONDS_DEFAULT;
783
- return Math.min(EPISODE_RECENCY_SCALE_SECONDS_MAX, Math.max(EPISODE_RECENCY_SCALE_SECONDS_MIN, Math.trunc(value)));
784
- }
785
- function clampEpisodeRecencyMidpoint(value) {
786
- if (!Number.isFinite(value)) return EPISODE_RECENCY_MIDPOINT_DEFAULT;
787
- return Math.min(EPISODE_RECENCY_MIDPOINT_MAX, Math.max(EPISODE_RECENCY_MIDPOINT_MIN, value));
788
- }
789
- function clampEpisodeProbeLimit(value) {
790
- if (!Number.isFinite(value)) return EPISODE_PROBE_LIMIT_DEFAULT;
791
- return Math.max(EPISODE_PROBE_LIMIT_MIN, Math.trunc(value));
792
- }
793
- function clampEpisodeScoreThreshold(value) {
794
- if (!Number.isFinite(value)) return EPISODE_SCORE_THRESHOLD_DEFAULT;
795
- return Math.min(EPISODE_SCORE_THRESHOLD_MAX, Math.max(EPISODE_SCORE_THRESHOLD_MIN, value));
796
- }
797
793
  function normalizeCognitionProfile(profile) {
798
794
  if (!profile) return void 0;
799
795
  const cleaned = {};
@@ -833,6 +829,32 @@ function mergeCognitionProfiles(current, patch) {
833
829
  return { profile: changed ? profile : void 0, removals };
834
830
  }
835
831
 
832
+ // src/schemas/memory/normalize-insight-path.helper.ts
833
+ function normalizePathSegment(segment) {
834
+ return segment.trim().toLowerCase().replace(/\s+/g, "-");
835
+ }
836
+ function normalizeInsightPath(path) {
837
+ const trimmed = path?.trim();
838
+ if (!trimmed) return void 0;
839
+ const dot = trimmed.indexOf(".");
840
+ if (dot <= 0) return void 0;
841
+ const field = normalizePathSegment(trimmed.slice(0, dot));
842
+ const keyword = normalizePathSegment(trimmed.slice(dot + 1));
843
+ if (!field || !keyword) return void 0;
844
+ return `${field}.${keyword}`;
845
+ }
846
+
847
+ // src/schemas/memory/parse-stored-profile.helper.ts
848
+ function parseStoredProfile(text) {
849
+ if (!text?.trim()) return {};
850
+ try {
851
+ const parsed = JSON.parse(text);
852
+ return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
853
+ } catch {
854
+ return {};
855
+ }
856
+ }
857
+
836
858
  // src/schemas/memory/prune-profile-topic.helper.ts
837
859
  var PRUNEABLE_ARRAY_FIELDS = ["expertise", "goals", "likes", "dislikes", "interests", "convictions"];
838
860
  var PRUNEABLE_RECORD_FIELDS = ["preferences", "corrections"];
@@ -1393,4 +1415,4 @@ var videolistSchema = z.object({
1393
1415
  internationalCoverage: internationalCoverageSchema.optional()
1394
1416
  });
1395
1417
 
1396
- export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, DEFAULT_VARIANT_ID, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, ENCYCLOPEDIA_TOOL_NAMES, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, EncyclopediaClassifySchema, EncyclopediaIngestTriageDecisionSchema, EncyclopediaIngestTriageSchema, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, IMAGE_TASK_TEMPLATES, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, MORE_MEDIA_COUNT, MemoryClusterSummarySchema, MemoryEnrichmentSchema, NON_PAGE_EXTENSIONS, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, ResearchTriageDecisionSchema, ResearchTriageSchema, TAXONOMY_ICON_ALLOWLIST, TOOL_DESCRIPTIONS, TOOL_NAMES, TaxonomyPairVerdictSchema, VARIANT_NAMES, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isImageTaskTemplate, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
1418
+ export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, DEFAULT_VARIANT_ID, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, ENCYCLOPEDIA_TOOL_NAMES, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, EncyclopediaClassifySchema, EncyclopediaIngestTriageDecisionSchema, EncyclopediaIngestTriageSchema, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, IMAGE_TASK_TEMPLATES, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, MORE_MEDIA_COUNT, MemoryClusterSummarySchema, MemoryEnrichmentSchema, NON_PAGE_EXTENSIONS, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, ResearchTriageDecisionSchema, ResearchTriageSchema, TAXONOMY_ICON_ALLOWLIST, TOOL_DESCRIPTIONS, TOOL_NAMES, TaxonomyPairVerdictSchema, VARIANT_NAMES, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAbsoluteHttpUrl, isAllFieldsNullWipe, isImageTaskTemplate, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
@@ -69,12 +69,6 @@ interface ToolConfigSnapshot {
69
69
  eodhd: EodhdConfig;
70
70
  }
71
71
 
72
- interface ToolLogger {
73
- log: (message: string, ...args: unknown[]) => void;
74
- warn: (message: string, ...args: unknown[]) => void;
75
- error: (message: string, ...args: unknown[]) => void;
76
- debug?: (message: string, ...args: unknown[]) => void;
77
- }
78
72
  interface MarketDailyBar {
79
73
  date: string;
80
74
  open: number;
@@ -84,6 +78,14 @@ interface MarketDailyBar {
84
78
  adjustedClose?: number;
85
79
  volume: number;
86
80
  }
81
+
82
+ interface ToolLogger {
83
+ log: (message: string, ...args: unknown[]) => void;
84
+ warn: (message: string, ...args: unknown[]) => void;
85
+ error: (message: string, ...args: unknown[]) => void;
86
+ debug?: (message: string, ...args: unknown[]) => void;
87
+ }
88
+
87
89
  interface ToolDependencies {
88
90
  getLiveConfig: () => ToolConfigSnapshot;
89
91
  logger: ToolLogger;
@@ -355,6 +357,20 @@ declare function resolveSerperShopOfferLinks<T extends ResolvableOffer>(offers:
355
357
 
356
358
  declare function storeHostToken(source: string): string;
357
359
 
360
+ type ToolSummaryFn = (data: Record<string, unknown>) => Record<string, unknown>;
361
+
362
+ declare const summarizeContent: ToolSummaryFn;
363
+
364
+ declare const summarizeFound: ToolSummaryFn;
365
+
366
+ declare const summarizeResults: ToolSummaryFn;
367
+
368
+ type ToolWithSummary = Tool & {
369
+ summarize?: ToolSummaryFn;
370
+ };
371
+
372
+ declare function withSummary(tool: Tool, summarize?: ToolSummaryFn): ToolWithSummary;
373
+
358
374
  type Variant = 'original' | 'grayscale' | 'denoised' | 'sharpened' | 'clahe';
359
375
  type FilterVariant = Exclude<Variant, 'original'>;
360
376
 
@@ -723,17 +739,6 @@ interface SerperWebpageScrapeResponse {
723
739
  title?: string;
724
740
  }
725
741
 
726
- type ToolSummaryFn = (data: Record<string, unknown>) => Record<string, unknown>;
727
-
728
- type ToolWithSummary = Tool & {
729
- summarize?: ToolSummaryFn;
730
- };
731
- declare const summarizeResults: ToolSummaryFn;
732
- declare const summarizeContent: ToolSummaryFn;
733
- declare const summarizeFound: ToolSummaryFn;
734
- declare const defaultSummarize: ToolSummaryFn;
735
- declare function withSummary(tool: Tool, summarize?: ToolSummaryFn): ToolWithSummary;
736
-
737
742
  declare function extractArticleText(html: string): string;
738
743
 
739
744
  declare const webFetchSchema: z.ZodObject<{
@@ -743,8 +748,6 @@ type WebFetchInput = z.infer<typeof webFetchSchema>;
743
748
 
744
749
  declare function createWebFetchTool(): Tool;
745
750
 
746
- declare function createYoutubeVideoSearch(deps: ToolDependencies): Tool;
747
-
748
751
  declare const youtubeVideoSearchSchema: z.ZodObject<{
749
752
  query: z.ZodString;
750
753
  count: z.ZodOptional<z.ZodNumber>;
@@ -758,6 +761,8 @@ declare const youtubeVideoSearchSchema: z.ZodObject<{
758
761
  }, z.core.$strip>;
759
762
  type YoutubeVideoSearchInput = z.infer<typeof youtubeVideoSearchSchema>;
760
763
 
764
+ declare function createYoutubeVideoSearch(deps: ToolDependencies): Tool;
765
+
761
766
  interface YoutubeSearchResponseItem {
762
767
  id?: {
763
768
  kind?: string;
@@ -798,4 +803,4 @@ interface VideoStats {
798
803
  lang?: string;
799
804
  }
800
805
 
801
- export { BRIGHT_DATA_TIMEOUT_MS, type BrightDataConfig, type BrightDataImageSearchInput, type BrightDataImageSearchResponse, type BrightDataNewsSearchInput, type BrightDataNewsSearchResponse, type BrightDataPlacesSearchInput, type BrightDataPlacesSearchResponse, type BrightDataShoppingSearchInput, type BrightDataShoppingSearchResponse, type BrightDataVideoSearchInput, type BrightDataVideoSearchResponse, type BrightDataWebSearchInput, type BrightDataWebSearchResponse, type BrightDataWebpageScrapeInput, type BrightDataWebpageScrapeResponse, type EncyclopediaReadToolInput, type EncyclopediaSearchToolInput, type EodhdConfig, type EodhdNewsConfig, type FilterVariant, HEADERS, MIN_IMAGE_HEIGHT, MIN_IMAGE_WIDTH, type MarketDailyBar, type MemoryCognitionDeleteInput, type MemoryCognitionDeleteOutcome, type MemoryCognitionForgetInput, type MemoryCognitionRememberInput, type MemoryPartitionDeleteInput, type MemoryPartitionRecallInput, type MemoryPartitionRememberInput, MemoryPoint, type MemoryTaxonomyProbeCandidate, type MemoryTaxonomyProbeInput, type MemoryTaxonomyProbeResult, type MemoryToolScope, type ProviderEndpointConfig, RECENCY_DESCRIPTION, type ResolvableOffer, SEARCH_RETRIES, SEARCH_TIMEOUT_MS, SOURCE, STANDALONE_QUERY_DESCRIPTION, STANDALONE_QUERY_TOOL_CLAUSE, type SearchRecency, type SerperBusinessReviewsSearchInput, type SerperBusinessReviewsSearchResponse, type SerperConfig, type SerperImageSearchInput, type SerperImageSearchResponse, type SerperNewsSearchInput, type SerperNewsSearchResponse, type SerperPlacesSearchInput, type SerperPlacesSearchResponse, type SerperShoppingSearchInput, type SerperShoppingSearchResponse, type SerperVideoSearchInput, type SerperVideoSearchResponse, type SerperWebSearchInput, type SerperWebSearchResponse, type SerperWebpageScrapeInput, type SerperWebpageScrapeResponse, type SourcesConfig, type ToolConfigSnapshot, type ToolDependencies, type ToolLogger, type ToolSummaryFn, type ToolWithSummary, type Variant, type VideoStats, type WebFetchInput, type YoutubeConfig, type YoutubeSearchResponse, type YoutubeVideoSearchInput, type YoutubeVideosResponse, applyLocaleParams, applyRecencyParam, brightDataImageSearchSchema, brightDataNewsSearchSchema, brightDataPlacesSearchSchema, brightDataShoppingSearchSchema, brightDataVideoSearchSchema, brightDataWebSearchSchema, brightDataWebpageScrapeSchema, buildGoogleUrl, buildYoutubeThumbnailUrl, createBrightDataImageSearch, createBrightDataNewsSearch, createBrightDataPlacesSearch, createBrightDataShoppingSearch, createBrightDataVideoSearch, createBrightDataWebSearch, createBrightDataWebpageScrape, createEncyclopediaReadTool, createEncyclopediaSearchTool, createMemoryCognitionDeleteTool, createMemoryCognitionForgetTool, createMemoryCognitionRememberTool, createMemoryPartitionDeleteTool, createMemoryPartitionRecallTool, createMemoryPartitionRememberTool, createMemoryTaxonomyProbeTool, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, defaultSummarize, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionDeleteSchema, memoryCognitionForgetSchema, memoryCognitionRememberSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryPartitionRememberSchema, memoryTaxonomyProbeSchema, pickMerchantResult, requestBrightData, resolveSerperShopOfferLinks, serperBusinessReviewsSearchSchema, serperImageSearchSchema, serperNewsSearchSchema, serperPlacesSearchSchema, serperShoppingSearchSchema, serperVideoSearchSchema, serperWebSearchSchema, serperWebpageScrapeSchema, storeHostToken, summarizeContent, summarizeFound, summarizeResults, tbsSizeLabelForPixels, variantRequestSchema, webFetchSchema, withSummary, youtubeVideoSearchSchema };
806
+ export { BRIGHT_DATA_TIMEOUT_MS, type BrightDataConfig, type BrightDataImageSearchInput, type BrightDataImageSearchResponse, type BrightDataNewsSearchInput, type BrightDataNewsSearchResponse, type BrightDataPlacesSearchInput, type BrightDataPlacesSearchResponse, type BrightDataShoppingSearchInput, type BrightDataShoppingSearchResponse, type BrightDataVideoSearchInput, type BrightDataVideoSearchResponse, type BrightDataWebSearchInput, type BrightDataWebSearchResponse, type BrightDataWebpageScrapeInput, type BrightDataWebpageScrapeResponse, type EncyclopediaReadToolInput, type EncyclopediaSearchToolInput, type EodhdConfig, type EodhdNewsConfig, type FilterVariant, HEADERS, MIN_IMAGE_HEIGHT, MIN_IMAGE_WIDTH, type MarketDailyBar, type MemoryCognitionDeleteInput, type MemoryCognitionDeleteOutcome, type MemoryCognitionForgetInput, type MemoryCognitionRememberInput, type MemoryPartitionDeleteInput, type MemoryPartitionRecallInput, type MemoryPartitionRememberInput, MemoryPoint, type MemoryTaxonomyProbeCandidate, type MemoryTaxonomyProbeInput, type MemoryTaxonomyProbeResult, type MemoryToolScope, type ProviderEndpointConfig, RECENCY_DESCRIPTION, type ResolvableOffer, SEARCH_RETRIES, SEARCH_TIMEOUT_MS, SOURCE, STANDALONE_QUERY_DESCRIPTION, STANDALONE_QUERY_TOOL_CLAUSE, type SearchRecency, type SerperBusinessReviewsSearchInput, type SerperBusinessReviewsSearchResponse, type SerperConfig, type SerperImageSearchInput, type SerperImageSearchResponse, type SerperNewsSearchInput, type SerperNewsSearchResponse, type SerperPlacesSearchInput, type SerperPlacesSearchResponse, type SerperShoppingSearchInput, type SerperShoppingSearchResponse, type SerperVideoSearchInput, type SerperVideoSearchResponse, type SerperWebSearchInput, type SerperWebSearchResponse, type SerperWebpageScrapeInput, type SerperWebpageScrapeResponse, type SourcesConfig, type ToolConfigSnapshot, type ToolDependencies, type ToolLogger, type ToolSummaryFn, type ToolWithSummary, type Variant, type VideoStats, type WebFetchInput, type YoutubeConfig, type YoutubeSearchResponse, type YoutubeVideoSearchInput, type YoutubeVideosResponse, applyLocaleParams, applyRecencyParam, brightDataImageSearchSchema, brightDataNewsSearchSchema, brightDataPlacesSearchSchema, brightDataShoppingSearchSchema, brightDataVideoSearchSchema, brightDataWebSearchSchema, brightDataWebpageScrapeSchema, buildGoogleUrl, buildYoutubeThumbnailUrl, createBrightDataImageSearch, createBrightDataNewsSearch, createBrightDataPlacesSearch, createBrightDataShoppingSearch, createBrightDataVideoSearch, createBrightDataWebSearch, createBrightDataWebpageScrape, createEncyclopediaReadTool, createEncyclopediaSearchTool, createMemoryCognitionDeleteTool, createMemoryCognitionForgetTool, createMemoryCognitionRememberTool, createMemoryPartitionDeleteTool, createMemoryPartitionRecallTool, createMemoryPartitionRememberTool, createMemoryTaxonomyProbeTool, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionDeleteSchema, memoryCognitionForgetSchema, memoryCognitionRememberSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryPartitionRememberSchema, memoryTaxonomyProbeSchema, pickMerchantResult, requestBrightData, resolveSerperShopOfferLinks, serperBusinessReviewsSearchSchema, serperImageSearchSchema, serperNewsSearchSchema, serperPlacesSearchSchema, serperShoppingSearchSchema, serperVideoSearchSchema, serperWebSearchSchema, serperWebpageScrapeSchema, storeHostToken, summarizeContent, summarizeFound, summarizeResults, tbsSizeLabelForPixels, variantRequestSchema, webFetchSchema, withSummary, youtubeVideoSearchSchema };