@triplef/agent 1.0.6 → 1.0.8

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.
@@ -4,9 +4,9 @@ declare const VARIANT_NAMES: readonly ["grayscale", "denoised", "sharpened", "cl
4
4
  type VariantName = (typeof VARIANT_NAMES)[number];
5
5
  declare const TOOL_DESCRIPTIONS: Record<string, string>;
6
6
  declare const BROWSER_TOOL_NAMES: readonly ["browser_navigate", "browser_navigate_back", "browser_snapshot", "browser_click", "browser_type", "browser_fill_form", "browser_select_option", "browser_press_key", "browser_wait_for", "browser_take_screenshot", "browser_tabs", "browser_console_messages", "browser_network_requests", "browser_verify_element_visible", "browser_verify_text_visible"];
7
- declare const MEMORY_TOOL_NAMES: readonly ["memory-partition-remember", "memory-partition-recall", "memory-partition-delete", "memory-cognition-remember", "memory-cognition-delete", "memory-cognition-forget"];
7
+ declare const MEMORY_TOOL_NAMES: readonly ["memory-partition-recall", "memory-partition-delete", "memory-cognition-delete", "memory-cognition-forget"];
8
8
  declare const ENCYCLOPEDIA_TOOL_NAMES: readonly ["encyclopedia-search", "encyclopedia-read"];
9
- declare const TOOL_NAMES: readonly ["webFetch", "brightDataWebSearch", "brightDataImageSearch", "brightDataNewsSearch", "brightDataPlacesSearch", "brightDataShoppingSearch", "brightDataVideoSearch", "brightDataWebpageScrape", "serperWebSearch", "serperImageSearch", "serperNewsSearch", "serperPlacesSearch", "serperShoppingSearch", "serperBusinessReviewsSearch", "serperVideoSearch", "serperWebpageScrape", "youtubeVideoSearch", "eodhdSearch", "eodhdQuote", "eodhdHistory", "eodhdTechnical", "eodhdIntraday", "eodhdNews", "eodhdFundamentals", "requestGrayscale", "requestDenoised", "requestSharpened", "requestClahe", "memory-partition-remember", "memory-partition-recall", "memory-partition-delete", "memory-cognition-remember", "memory-cognition-forget", "browser_navigate", "browser_navigate_back", "browser_snapshot", "browser_click", "browser_type", "browser_fill_form", "browser_select_option", "browser_press_key", "browser_wait_for", "browser_take_screenshot", "browser_tabs", "browser_console_messages", "browser_network_requests", "browser_verify_element_visible", "browser_verify_text_visible"];
9
+ declare const TOOL_NAMES: readonly ["webFetch", "brightDataWebSearch", "brightDataImageSearch", "brightDataNewsSearch", "brightDataPlacesSearch", "brightDataShoppingSearch", "brightDataVideoSearch", "brightDataWebpageScrape", "serperWebSearch", "serperImageSearch", "serperNewsSearch", "serperPlacesSearch", "serperShoppingSearch", "serperBusinessReviewsSearch", "serperVideoSearch", "serperWebpageScrape", "youtubeVideoSearch", "eodhdSearch", "eodhdQuote", "eodhdHistory", "eodhdTechnical", "eodhdIntraday", "eodhdNews", "eodhdFundamentals", "requestGrayscale", "requestDenoised", "requestSharpened", "requestClahe", "memory-partition-recall", "memory-partition-delete", "memory-cognition-forget", "browser_navigate", "browser_navigate_back", "browser_snapshot", "browser_click", "browser_type", "browser_fill_form", "browser_select_option", "browser_press_key", "browser_wait_for", "browser_take_screenshot", "browser_tabs", "browser_console_messages", "browser_network_requests", "browser_verify_element_visible", "browser_verify_text_visible"];
10
10
  type ToolName = (typeof TOOL_NAMES)[number];
11
11
 
12
12
  declare const DEFAULT_VARIANT_ID = "default";
@@ -17,21 +17,21 @@ type ImageTaskTemplate = (typeof IMAGE_TASK_TEMPLATES)[number];
17
17
  declare function isImageTaskTemplate(template: string): template is ImageTaskTemplate;
18
18
  declare const IntentSchema: z.ZodObject<{
19
19
  template: z.ZodEnum<{
20
- text: "text";
21
- summary: "summary";
22
20
  article: "article";
23
- evaluation: "evaluation";
24
- merge: "merge";
25
21
  news: "news";
26
- stockmarketitem: "stockmarketitem";
27
- stockmarketlist: "stockmarketlist";
28
22
  describe: "describe";
29
23
  compare: "compare";
30
24
  ocr: "ocr";
25
+ summary: "summary";
26
+ evaluation: "evaluation";
31
27
  product: "product";
32
28
  shoplist: "shoplist";
33
29
  imagelist: "imagelist";
34
30
  videolist: "videolist";
31
+ stockmarketitem: "stockmarketitem";
32
+ stockmarketlist: "stockmarketlist";
33
+ merge: "merge";
34
+ text: "text";
35
35
  }>;
36
36
  prompt: z.ZodDefault<z.ZodString>;
37
37
  tools: z.ZodArray<z.ZodEnum<{
@@ -78,10 +78,8 @@ declare const IntentSchema: z.ZodObject<{
78
78
  requestDenoised: "requestDenoised";
79
79
  requestSharpened: "requestSharpened";
80
80
  requestClahe: "requestClahe";
81
- "memory-partition-remember": "memory-partition-remember";
82
81
  "memory-partition-recall": "memory-partition-recall";
83
82
  "memory-partition-delete": "memory-partition-delete";
84
- "memory-cognition-remember": "memory-cognition-remember";
85
83
  "memory-cognition-forget": "memory-cognition-forget";
86
84
  }>>;
87
85
  getDate: z.ZodDefault<z.ZodBoolean>;
@@ -1,5 +1,5 @@
1
- import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.types-iJugcVmt.js';
2
- export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.types-iJugcVmt.js';
1
+ import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.types-pA32lgh8.js';
2
+ export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.types-pA32lgh8.js';
3
3
  import { M as MemoryPoint } from '../memory-point.model-C4wvvjAY.js';
4
4
  import * as zod from 'zod';
5
5
  import { z, ZodTypeAny, ZodType } from 'zod';
@@ -219,15 +219,6 @@ declare function buildMemoryProfilePrompt(params: {
219
219
  maxPayloadChars?: number;
220
220
  }): string;
221
221
 
222
- declare const MEMORY_WRITE_INSTRUCTIONS = "MEMORY WRITE JOB \u2014 one purpose: decide whether THIS turn yielded anything worth persisting, and store it in the correct lane via the memory-partition-remember or memory-cognition-remember tool.\n\nTwo lanes, never confused:\n- memory-partition = the OBJECTIVE fact store: external-world facts, factual records, project details, and events the user stated, subjects gathered this turn, or facts the user asked you to remember.\n- memory-cognition = the SUBJECTIVE profile store: every preference, interest, trait, or internal state of the user (stated or inferred) \u2014 YOUR understanding of the user, persona learnings included.\n\nYou receive:\n- USER REQUEST: what the user asked.\n- PRIOR MEMORY: facts already stored for this user (may be empty).\n- PROBED THIS TURN: what memory-partition-recall already surfaced for this turn (may be empty) \u2014 already known, never re-store.\n- GATHERED DATA: summarized tool results from this turn (web searches, lookups).\n\nStore into the PARTITION lane (call memory-partition-remember) only when it is durable, objective, and user-specific:\n- A factual record the user states or asks you to track (contact info, a decision, a project detail, an event, their setup \u2014 however phrased, any language).\n- Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.\n\nROUTING CONSTRAINT (absolute): extract ONLY objective, external facts to the partition. You MUST NOT store user preferences, behavioral traits, or internal states there (\"the user likes\u2026\", \"the user is interested in\u2026\", \"the user prefers\u2026\"). All user profile and persona data is deferred to the cognition tier.\n\nStore into the COGNITION lane (call memory-cognition-remember) whenever the turn yields SUBJECTIVE user data, stated or derived:\n- A preference or interest the user states outright (favorite X, a like or dislike, a style choice) \u2014 stated preferences live HERE, never in the partition.\n- An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.\n- Never an objective fact \u2014 those belong in the partition lane.\n\nSTORAGE MECHANICS \u2014 how your memory works (write for the retriever):\n- Each stored record is embedded as a whole AND matched sentence-by-sentence at recall time (multi-variant retrieval). One self-contained fact per call; a single long, dense sentence is fine, but lead with the subject (\"Sam's phone number is 555-1234\", never \"His number is \u2026\").\n- Restating a record verbatim OVERWRITES it in place \u2014 updates are restatements of the full corrected statement, not diffs.\n- tags are the ONLY topic-filter vocabulary at recall \u2014 reuse stable, lowercase topic labels (partition lane only). Tags are NARROW and specific: entity names, product names, game titles (\"amd\", \"stellar blade\", \"stellar blade blood rain\").\n- The macro-taxonomy routes a fact into its family hierarchy (partition lane only), top-down: CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE (the NODE is the stored record itself \u2014 never named):\n - category (CLUSTER): ONE lowercase PLURAL family noun \u2014 stocks, games, pets, work, health, finance, contacts \u2026\n - community (COMMUNITY): ONE lowercase PLURAL sub-family narrowing the category (\"survival games\" under \"games\", \"tv shows\" under \"shows\"); omit when no sub-family applies.\n - subject (HUB): the lowercase SINGULAR main subject entity the fact is about (\"project zomboid\", \"amd\", \"sam\") \u2014 a specific name, never pluralized; always include when the fact is about a specific entity.\n A category or community is NEVER a specific entity, product, company, or game title: \"amd\" is a subject under the category \"stocks\"; \"stellar blade\" is a subject under the category \"games\"; a show/work title like \"breaking-bad\" is a tag or hub, never a community. Always include category; reuse the existing labels whenever they fit.\n- PERSONA & FICTION CONTENT (absolute): content about an adopted persona, a roleplay, or a fictional/entertainment work routes by its real-world MEDIUM, never by in-universe domains \u2014 a TV persona's biography, family, or career belongs under the medium family (category \"shows\", community \"tv shows\", hub the show's title or the persona name); never \"family\", \"education\", \"business\", or \"science\" for invented content.\n\nTAXONOMY PROBING (pick first, create if necessary): before naming a tier label you are not certain exists, call memory-taxonomy-probe top-down \u2014 cluster \u2192 community \u2192 hub \u2192 node \u2014 and ADOPT a returned candidate by naming it VERBATIM in the remember call (its id becomes the next probe's parentId). CREATE a new label only when every candidate misses the meaning \u2014 then follow the phrasing rules (plural family/sub-family, singular hub, singular node aspect) and optionally pass an \"icon\" from the curated set for the label you create. The known-vocabulary section below already lists likely fits; probing confirms them or finds better ones.\n\nDo NOT store:\n- Public facts merely fetched this turn that do not relate to the user (e.g. generic web results).\n- Anything already covered by PRIOR MEMORY or PROBED THIS TURN \u2014 extend or update it via the remember call; do not repeat.\n- Tool artifacts: URLs, search scores, image metadata, raw JSON keys.\n- Inferred, assumed, or extrapolated details about the user that neither their words nor GATHERED DATA support \u2014 if the user did not state it (or clearly imply it), it is not memory; when in doubt, answer \"none\".\n\nRules:\n- Each remember call stores ONE self-contained statement (stand-alone, understandable weeks later without this conversation's context).\n- Call each remember tool once per distinct durable item \u2014 no more.\n- If nothing durable surfaced, produce a one-word text answer (\"none\") and make NO tool call. An empty memory write is a correct outcome, never a failure.";
223
- declare function buildMemoryWritePrompt(params: {
224
- userRequest: string;
225
- priorMemory?: string;
226
- probedMemory?: string;
227
- gathered?: string;
228
- vocabulary?: TaxonomyVocabulary;
229
- }): string;
230
-
231
222
  declare const RESEARCH_FRICTION_QUERY_INSTRUCTIONS: string;
232
223
  declare function buildResearchFrictionQueryPrompt(contests: Array<{
233
224
  id: string;
@@ -426,4 +417,4 @@ declare const verdictSpineSnippet: TemplateSnippet;
426
417
 
427
418
  declare const videoGallerySnippet: TemplateSnippet;
428
419
 
429
- export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, type ContentSystemPromptParams, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, ENCYCLOPEDIA_INGEST_TRIAGE_INSTRUCTIONS, type ExtractionSourceRole, FINAL_REMINDER, FRICTION_INSTRUCTIONS, type FrictionFact, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, MEMORY_CLUSTER_INSTRUCTIONS, MEMORY_CONSOLIDATE_INSTRUCTIONS, MEMORY_PROFILE_INSTRUCTIONS, MEMORY_WRITE_INSTRUCTIONS, MERGE_MEDIA_RULES, MERGE_TOPIC_RULE, MULTIMODAL_POLICY, NOISE_RULES, OCR_INSTRUCTIONS, OCR_VERBATIM_INSTRUCTIONS, PRECEDENCE_RULES, PRODUCT_INSTRUCTIONS, RESEARCH_FRICTION_QUERY_INSTRUCTIONS, RESEARCH_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, type ResponseLayout, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, type SnippetTemplatePreset, type SourcePolicyConfig, type StructuredPromptTemplate, TAXONOMY_RECONCILE_INSTRUCTIONS, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TEXT_OPINION_INSTRUCTIONS, TOOL_RESULTS_RULES, type TaxonomyVocabulary, type TemplateSnippet, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildDescribePdfPagePrompt, buildEncyclopediaClassifyPrompt, buildEncyclopediaIngestTriagePrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchFrictionQueryPrompt, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, buildSynopsisProbeSection, buildTaxonomyPairPrompt, buildTaxonomyReconcileSystemPrompt, buildToolExecutePrompt, buildVocabularySection, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatCurrentTimestamp, formatProvenanceLine, formatToolAvailabilityCatalog, formatVariantCatalog, gallerySnippet, getSnippetTemplateKeys, getSnippetTemplateSchema, headerArticleSnippet, headerNewsSnippet, heroMediaSnippet, internationalCoverageSnippet, introductionSnippet, isSnippetTemplate, keyFindingsSnippet, languageCorrectionPrompt, leadSnippet, mergePreset, mergedEvaluationsSnippet, newsKeyFindingsSnippet, newsPreset, quoteSnippet, reasoningSnippet, relatedStoriesSnippet, resolveLanguageName, resolveVariantInstructions, responseLayoutSchema, sourcesSnippet, subjectSchema, subjectsSnippet, summarySnippet, verdictSpineSnippet, videoGallerySnippet };
420
+ export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, type ContentSystemPromptParams, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, ENCYCLOPEDIA_INGEST_TRIAGE_INSTRUCTIONS, type ExtractionSourceRole, FINAL_REMINDER, FRICTION_INSTRUCTIONS, type FrictionFact, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, MEMORY_CLUSTER_INSTRUCTIONS, MEMORY_CONSOLIDATE_INSTRUCTIONS, MEMORY_PROFILE_INSTRUCTIONS, MERGE_MEDIA_RULES, MERGE_TOPIC_RULE, MULTIMODAL_POLICY, NOISE_RULES, OCR_INSTRUCTIONS, OCR_VERBATIM_INSTRUCTIONS, PRECEDENCE_RULES, PRODUCT_INSTRUCTIONS, RESEARCH_FRICTION_QUERY_INSTRUCTIONS, RESEARCH_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, type ResponseLayout, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, type SnippetTemplatePreset, type SourcePolicyConfig, type StructuredPromptTemplate, TAXONOMY_RECONCILE_INSTRUCTIONS, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TEXT_OPINION_INSTRUCTIONS, TOOL_RESULTS_RULES, type TaxonomyVocabulary, type TemplateSnippet, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildDescribePdfPagePrompt, buildEncyclopediaClassifyPrompt, buildEncyclopediaIngestTriagePrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchFrictionQueryPrompt, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, buildSynopsisProbeSection, buildTaxonomyPairPrompt, buildTaxonomyReconcileSystemPrompt, buildToolExecutePrompt, buildVocabularySection, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatCurrentTimestamp, formatProvenanceLine, formatToolAvailabilityCatalog, formatVariantCatalog, gallerySnippet, getSnippetTemplateKeys, getSnippetTemplateSchema, headerArticleSnippet, headerNewsSnippet, heroMediaSnippet, internationalCoverageSnippet, introductionSnippet, isSnippetTemplate, keyFindingsSnippet, languageCorrectionPrompt, leadSnippet, mergePreset, mergedEvaluationsSnippet, newsKeyFindingsSnippet, newsPreset, quoteSnippet, reasoningSnippet, relatedStoriesSnippet, resolveLanguageName, resolveVariantInstructions, responseLayoutSchema, sourcesSnippet, subjectSchema, subjectsSnippet, summarySnippet, verdictSpineSnippet, videoGallerySnippet };
@@ -1242,17 +1242,18 @@ var STANDALONE_QUERY_RULES = `STANDALONE QUERY RULES (absolute \u2014 they apply
1242
1242
  var PRODUCT_QUERY_GUIDANCE = `QUERY CRAFTING (product task) \u2014 phrase each tool query for its endpoint; never reuse one query for all tools:
1243
1243
  - Language: phrase descriptive query words (review/test/unboxing/specs) in the detected user language; keep product names, brand names, and model numbers verbatim.
1244
1244
  - *ShoppingSearch: the bare product name with exact model number (e.g. "Sony WH-1000XM5"). No extra words like "buy", "price", or "review".
1245
- - *WebSearch: factual queries such as "<product> specifications" and "<product> review" for editorial reviews and facts.
1245
+ - *WebSearch: factual queries such as "<product> specifications" and "<product> review" for editorial reviews and facts. Each call returns only the top 3 results \u2014 one call per distinct aspect, never merge different aspects into one query.
1246
1246
  - *ImageSearch: "<product>" optionally with "official" for clean product shots.
1247
1247
  - *VideoSearch: "<product> review", "<product> hands-on", or "<product> unboxing".
1248
- - *WebpageScrape / webFetch: fetch the most authoritative review or spec page discovered by the *WebSearch results when snippets are insufficient.`;
1248
+ - *WebpageScrape / webFetch: fetch the most authoritative review or spec page discovered by the *WebSearch results when snippets are insufficient. The top 3 search results are already fetched automatically \u2014 only fetch pages beyond those.`;
1249
1249
  var GENERAL_QUERY_GUIDANCE = `QUERY CRAFTING \u2014 phrase each tool query for its endpoint; never reuse one query for all tools:
1250
1250
  - Language: phrase descriptive query words in the detected user language; keep entity names (products, brands, people, places) verbatim.
1251
- - *WebSearch: precise factual queries with the key entities and qualifiers (version, model, location). Only add a year/recency qualifier when the FRESHNESS rules call for it \u2014 not for evergreen topics.
1251
+ - *WebSearch: precise factual queries with the key entities and qualifiers (version, model, location). Only add a year/recency qualifier when the FRESHNESS rules call for it \u2014 not for evergreen topics. Each call returns only the top 3 results, so a request spanning distinct topics or entities MUST issue one call per topic \u2014 never merge unrelated subjects into one query, or coverage is lost.
1252
1252
  - *ReviewsSearch: reviews BUSINESSES only \u2014 call it with an exact business or place name, never with a product or topic.
1253
1253
  - *PlacesSearch: phrase it like a Google Maps search \u2014 a business name or "<business type> in <location>".
1254
1254
  - *ImageSearch: short visual descriptions of the subject.
1255
- - *VideoSearch: subject plus the video type (e.g. "review", "trailer", "tutorial"); vary queries between fresh and evergreen angles as the FRESHNESS rules describe.`;
1255
+ - *VideoSearch: subject plus the video type (e.g. "review", "trailer", "tutorial"); vary queries between fresh and evergreen angles as the FRESHNESS rules describe.
1256
+ - *WebpageScrape / webFetch: the top 3 search results are already fetched automatically \u2014 call a fetch tool only for a specific page beyond those, when snippets are insufficient.`;
1256
1257
  function buildToolExecutePrompt(intent) {
1257
1258
  const tools = intent?.tools ?? [];
1258
1259
  const toolList = tools.length > 0 ? `MANDATORY tools you MUST call: ${tools.join(", ")}.` : "No tools are selected.";
@@ -1283,7 +1284,7 @@ Derive the search query or target URL for each tool from the latest user message
1283
1284
  ${STANDALONE_QUERY_RULES}
1284
1285
  ${queryGuidance}
1285
1286
  Emit ALL mandatory tool calls in ONE response, as parallel tool calls. Do not stop after the first tool call.
1286
- You may call the same tool more than once with differently phrased queries when the task needs broader coverage.
1287
+ You may call the same tool more than once with differently phrased queries when the task needs broader coverage. Because each *WebSearch/*NewsSearch call returns only the top 3 results, every distinct topic or entity gets its own call \u2014 folding two subjects into one query loses the second subject's results.
1287
1288
  When you call the SAME search tool multiple times and an explicit imageCount/videoCount is set, split that total evenly across the calls so their sum equals the target \u2014 never pass the full count to each call. Example: total 10 across 3 queries \u2192 pass count 4, 3, 3. When no explicit count is set, make every call WITHOUT a count parameter and let each tool use its default.
1288
1289
  Each mandatory tool must be called at least once. Missing a mandatory tool is a failure.
1289
1290
  ${countInstruction}
@@ -1297,16 +1298,16 @@ FINAL REMINDER:
1297
1298
  // src/schemas/helpers/tools/tool-registry.constant.ts
1298
1299
  var VARIANT_NAMES = ["grayscale", "denoised", "sharpened", "clahe"];
1299
1300
  var TOOL_DESCRIPTIONS = {
1300
- 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.",
1301
+ brightDataWebSearch: "Search the web using Bright Data SERP API (Google). Returns at most the top 3 organic results per call (titles, snippets, links) \u2014 a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year) for fresh results.",
1301
1302
  brightDataImageSearch: "Search for images using Bright Data SERP API (Google Images). Returns image URLs, source pages, and dimensions. Enforces a minimum of 1280\xD7720 (720p).",
1302
- brightDataNewsSearch: "Search latest news using Bright Data SERP API. Returns headlines, sources, dates, and snippets. Supports an optional recency window (day/week/month/year).",
1303
+ brightDataNewsSearch: "Search latest news using Bright Data SERP API \u2014 at most the top 3 results per call (headlines, sources, dates, snippets), so a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year).",
1303
1304
  brightDataPlacesSearch: "Search places and businesses using Bright Data SERP API (Google Maps). Returns addresses, phone numbers, ratings, review counts, and coordinates. Query with a business name or business type plus location.",
1304
1305
  brightDataShoppingSearch: "Search for products using Bright Data SERP API (Google Shopping). Returns prices, sellers, images, and ratings. Query with the bare product name and model number.",
1305
1306
  brightDataVideoSearch: `Search for videos using Bright Data SERP API. Returns titles, links, channel names, duration, and publish dates. Supports an optional recency window (day/week/month/year) for fresh results. ${EMBEDDABLE_VIDEO_PROVIDER_CLAUSE}`,
1306
1307
  brightDataWebpageScrape: "Fetch and render a full webpage using Bright Data Web Unlocker API. Returns clean Markdown text. Use for pages behind anti-bot protection that plain fetch cannot reach.",
1307
- serperWebSearch: "Search the web using Serper.dev (Google). Returns organic results with titles, snippets, and links. Supports an optional recency window (day/week/month/year) for fresh results.",
1308
+ serperWebSearch: "Search the web using Serper.dev (Google). Returns at most the top 3 organic results per call (titles, snippets, links) \u2014 a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year) for fresh results.",
1308
1309
  serperImageSearch: "Search for images using Serper.dev (Google Images). Prefers 2560\xD71440 (1440p) images and enforces a minimum of 1280\xD7720 (720p) via the Google Images tbs size filter and a client-side dimension filter. Supports an optional recency window (day/week/month/year).",
1309
- serperNewsSearch: "Search latest news using Serper.dev. Returns headlines, sources, dates, and snippets. Supports an optional recency window (day/week/month/year).",
1310
+ serperNewsSearch: "Search latest news using Serper.dev \u2014 at most the top 3 results per call (headlines, sources, dates, snippets), so a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year).",
1310
1311
  serperPlacesSearch: "Search places and businesses using Serper.dev (Google Maps). Returns addresses, phone numbers, ratings, review counts, and coordinates. Query with a business name or business type plus location.",
1311
1312
  serperShoppingSearch: "Search for products using Serper.dev (Google Shopping). Returns prices, sellers, delivery info, images, and per-offer ratings. Query with the bare product name and model number.",
1312
1313
  serperBusinessReviewsSearch: "Fetch Google Maps reviews for a specific business or place using Serper.dev. Returns reviewer snippets with author names, star ratings, and dates. Use for seller/business reputation, not editorial product reviews.",
@@ -1320,7 +1321,7 @@ var TOOL_DESCRIPTIONS = {
1320
1321
  eodhdIntraday: "Fetch intraday OHLCV bars for an EODHD ticker and return a per-day, per-price-band volume profile as chartData for the client heatmap. Use to render a volume heatmap across fixed price bands.",
1321
1322
  eodhdNews: "Fetch recent financial news for an EODHD ticker \u2014 headlines, links, sources, publish dates. Use to ground a stock-market answer in what is happening around a company.",
1322
1323
  eodhdFundamentals: "Fetch company fundamentals for an EODHD ticker \u2014 general info, valuation, and key financial highlights (sector, market cap, P/E, revenue, margins).",
1323
- webFetch: "Fetch the full content of a specific URL (e.g. a search result page) as clean Markdown. Prefer fetching the most relevant search results to ground the answer in full source text rather than relying on snippets alone.",
1324
+ webFetch: "Fetch the full content of a specific URL (e.g. a search result page) as clean Markdown. The top 3 web/news search results are fetched automatically when no fetch tool is selected \u2014 use this only for a specific page beyond those, when full source text is needed beyond the snippets.",
1324
1325
  browser_navigate: "Control a real browser: navigate to a URL. Use for interactive browsing \u2014 JS-heavy pages, content behind clicks, tabs, scrolling, or forms \u2014 that static search/fetch cannot reach. Follow up with browser_snapshot to read the page before acting on it.",
1325
1326
  browser_navigate_back: "Go back to the previous page in the browser history.",
1326
1327
  browser_snapshot: "Read the current browser page as an accessibility snapshot (structured text with element refs). The primary way to see page content and obtain the refs that browser_click/browser_type need.",
@@ -1340,10 +1341,8 @@ var TOOL_DESCRIPTIONS = {
1340
1341
  requestDenoised: "Request a denoised (blurred) version of the images. Use when the original has noise, grain, or artifacts that hide details.",
1341
1342
  requestSharpened: "Request a sharpened version of the images. Use when edges or fine details are blurry.",
1342
1343
  requestClahe: "Request a CLAHE (contrast-enhanced) version of the images. Use when details are hidden in shadows or highlights.",
1343
- "memory-partition-remember": `Store into the user's fact partition (memory-partition) \u2014 OBJECTIVE facts only: notable external-world facts about subjects they care about (projects, followed stocks, people, past topics), objective details they state (contact info, decisions, constraints), and objective facts they explicitly ask you to remember. Subjective user data (preferences, interests, traits, internal states) belongs to memory-cognition-remember, never here. Storing gathered knowledge is expected \u2014 do not wait for an explicit "remember" instruction.`,
1344
1344
  "memory-partition-recall": "Retrieve from the user's fact partition (memory-partition) \u2014 things they told you in past conversations or asked you to remember. These are trusted user statements, not public facts; attribute them to the user and prefer them over web results for anything personal. Check this tool whenever a request touches a subject this user has cared about before.",
1345
1345
  "memory-partition-delete": "Delete one exact fact record from the user's fact partition (memory-partition), quoted verbatim from a memory-partition-recall result. Never delete on a guess: recall first, delete the verbatim statement. Needs memory-partition-recall alongside it.",
1346
- "memory-cognition-remember": "Store one insight into your cognition space (memory-cognition) \u2014 the exclusive store for subjective user data: preferences and interests the user states, inferred traits, standing interests, working nuances, connections between facts. Objective facts (contact info, decisions, project details, events) belong in memory-partition-remember.",
1347
1346
  "memory-cognition-delete": 'Delete one targeted piece of your cognition space (memory-cognition): a verbatim stored insight (quoted from your cognition context) and/or one standing profile topic by its path ("likes.jazz"). The per-item forget for subjective user data; memory-cognition-forget is the whole-space wipe.',
1348
1347
  "memory-cognition-forget": "Wipe your entire cognition space (memory-cognition) of the user \u2014 the structured profile AND every derived insight \u2014 only when the user asks you to forget your learned understanding of them or to start over. Fact records in the partition are untouched."
1349
1348
  };
@@ -1393,10 +1392,8 @@ var TOOL_NAMES = [
1393
1392
  "requestDenoised",
1394
1393
  "requestSharpened",
1395
1394
  "requestClahe",
1396
- "memory-partition-remember",
1397
1395
  "memory-partition-recall",
1398
1396
  "memory-partition-delete",
1399
- "memory-cognition-remember",
1400
1397
  "memory-cognition-forget",
1401
1398
  ...BROWSER_TOOL_NAMES
1402
1399
  ];
@@ -2431,18 +2428,12 @@ ${CONTENT_LANGUAGE_RULE}`;
2431
2428
 
2432
2429
  // src/prompts/harness/intent-selection/memory-rules.prompt.ts
2433
2430
  var MEMORY_RULES = `MEMORY RULES (ABSOLUTE \u2014 when memory tools are enabled)
2434
- Memory is an active growth loop, not a passive store: the model gathers knowledge about the
2435
- user's subjects, notices their preferences, and enriches the store on every relevant turn \u2014
2436
- without needing an explicit "remember" instruction. Two lanes, never confused:
2437
- - memory-partition = the OBJECTIVE fact store: external-world facts, factual records, project details, and events the user stated, subjects gathered, or facts the user asked you to remember.
2431
+ Memory is an active growth loop, not a passive store: the model probes its memory on every turn, and an automatic background pass after each answered turn decides what (if anything) is worth persisting. Two lanes, never confused:
2432
+ - memory-partition = the OBJECTIVE fact store: external-world facts, factual records, project details, and events the user stated, subjects gathered, or facts the user asked to remember.
2438
2433
  - memory-cognition = the SUBJECTIVE profile store: EVERY preference, interest, trait, or internal state of the user (stated or inferred) plus your persona learnings \u2014 subjective user data NEVER goes to the partition.
2434
+ - AUTOMATIC WRITE: persisting needs NO tool and no instruction from you \u2014 after every turn, a judged memory pass reads the turn with its gathered data and stores what is durably worth remembering (objective facts to the partition, preferences and derived understanding to cognition, explicit "remember this" asks included). Never claim you stored something during the turn, and never skip capturing because no write tool exists \u2014 the background pass has it covered.
2439
2435
  - ALWAYS-PROBE: include the enabled memory-partition-recall tool in EVERY request as a cheap probe \u2014 regardless of topic, template, or how public the answer looks. The classifier cannot know whether the user has stored memory about the subject without checking; the probe is that check. memory-partition-recall returns any stored objective facts about the request's subject (saved vital data, contact details, decisions, notes, earlier statements) which the answer must include alongside public data, keeping the two sources distinct.
2440
- - GATHER-TO-REMEMBER: when the request concerns a subject the user cares about (a favorite, an interest, a project, a stock they follow, a person, a past topic), include BOTH the enabled *WebSearch tools AND the enabled memory-partition-remember tool \u2014 the web searches collect more general knowledge about that subject, and the memory-partition-remember call stores the notable facts that were found, so the subject profile grows with every turn. Research results are notable facts that belong in memory, not just the user's own statements.
2441
- - FACT CAPTURE: when the user states an objective, durable detail (their contact info, their setup, a decision, a project fact), include the enabled memory-partition-remember tool so that fact is recorded.
2442
- - PREFERENCE CAPTURE: when the user states a preference, interest, or trait about themselves (their favorite X, a like or dislike, a style choice \u2014 however phrased, any language), include the enabled memory-cognition-remember tool so that preference is recorded in the cognition lane \u2014 even when the user did not say "remember". Preferences never belong in the partition; noticing and storing them is expected behavior.
2443
- - DERIVED UNDERSTANDING: when the turn reveals something you LEARN about the user that they did not state outright (an inferred trait, a standing interest, a connection between facts), include the enabled memory-cognition-remember tool so that understanding is recorded in the cognition lane \u2014 never in the partition lane.
2444
- - EXPLICIT INSTRUCTION: when the user explicitly asks to remember, track, follow, or learn something (however phrased, in any language), act on it: an objective fact goes to the enabled memory-partition-remember tool, a preference or any other subjective profile datum ("remember that I like\u2026") goes to the enabled memory-cognition-remember tool.
2445
- - UPDATE-LOOP: when memory-partition-recall shows the user already has facts on the subject, the remember call must UPDATE or EXTEND them, never duplicate or contradict. The turn pipeline also extracts notable facts automatically, so the remember tool is the explicit agentic write, not the only write path.
2436
+ - UPDATE-LOOP: when memory-partition-recall shows the user already has facts on the subject, the answer reflects them and the automatic write pass refines or extends them when the user restates or corrects a detail \u2014 restating a stored record updates it in place, never duplicates it.
2446
2437
  - FORGET A FACT: when the user asks to forget, delete, or stop remembering a specific statement (however phrased, in any language), include the enabled memory-partition-recall AND memory-partition-delete tools \u2014 recall surfaces the verbatim stored statement, delete removes exactly that record. Deletion is exact: the model recalls first, then deletes the verbatim text (records have no ids).
2447
2438
  - FORGET A PREFERENCE: when the user asks to forget a preference, an interest, or any other subjective profile datum ("forget that I like\u2026", however phrased, in any language), include the enabled memory-cognition-delete tool \u2014 it deletes one verbatim insight (quoted from your injected cognition context) and/or prunes one standing profile topic by its path ("likes.jazz"). Targeted and confirmable \u2014 no wipe involved.
2448
2439
  - FORGET UNDERSTANDING: when the user asks to forget what you know or have LEARNED about them (preferences, traits, persona \u2014 not an objective fact), include the enabled memory-cognition-forget tool \u2014 it wipes your whole cognition space (the structured profile AND every derived insight), the AI's own accumulated model of the user. For a single preference or insight, memory-cognition-delete is the targeted path; the wipe is for starting over. Full fact-store wipes stay a settings (settings) action, never a tool call.
@@ -2609,9 +2600,9 @@ var WHEN_TO_USE_TOOLS_RULES = `WHEN TO USE TOOLS
2609
2600
  - user asks about a specific product to buy, prices, or best deals \u2192 product template with a *WebSearch tool, shopping search, and reviews search
2610
2601
  - user asks about specific factual entities, specifications, data, statistics \u2192 the enabled *WebSearch tool`;
2611
2602
  var FETCH_AFTER_SEARCH_RULES = `FETCH-AFTER-SEARCH RULES
2612
- - When you include a *WebSearch tool for factual research (article, news, evaluation, product, or text), also include a fetch tool \u2014 webFetch, serperWebpageScrape, or brightDataWebpageScrape \u2014 to fetch the most relevant result pages (typically 1-3; more when the topic is broad and several pages each add distinct depth).
2613
- - The fetched full content grounds the answer in source text (not just snippets) and populates the knowledge cache for future turns.
2614
- - You decide which pages are worth fetching: fetch only pages whose full content would meaningfully improve the answer. Skip fetching for trivial lookups, quick facts, or when the snippets already answer the request completely.
2603
+ - The top 3 results of every *WebSearch/*NewsSearch call are fetched automatically when no fetch tool is selected. Do NOT include a fetch tool merely to ground the answer \u2014 that grounding always happens on its own.
2604
+ - Include a fetch tool \u2014 webFetch, serperWebpageScrape, or brightDataWebpageScrape \u2014 only when the answer needs full text from a specific page beyond the auto-fetched top 3 (e.g. a spec sheet or review the user asked about).
2605
+ - Fetch sparingly: the 1-2 most authoritative pages whose full content meaningfully improves the answer. Skip fetching for trivial lookups, quick facts, or when the snippets already answer the request completely.
2615
2606
  - Prefer primary/readable sources \u2014 official sites, documentation, Wikipedia, news articles \u2014 over app stores, forums, and discussion threads, unless the question is specifically about those.
2616
2607
  - Prefer webFetch for plain pages; use a scrape tool for pages behind anti-bot protection.`;
2617
2608
  var MEDIA_TYPE_TOOL_RULES = `MEDIA-TYPE TOOL SELECTION
@@ -3515,66 +3506,6 @@ ${limitText(priorFacts, params.maxPayloadChars)}`
3515
3506
  return parts.join("\n\n");
3516
3507
  }
3517
3508
  var MEMORY_PROFILE_VERDICT = "Decide: output the JSON object now \u2014 the profile patch (or null when unchanged), any new insights, and an optional episode.";
3518
-
3519
- // src/prompts/memory/memory-write-prompt.constant.ts
3520
- var MEMORY_WRITE_INSTRUCTIONS = `MEMORY WRITE JOB \u2014 one purpose: decide whether THIS turn yielded anything worth persisting, and store it in the correct lane via the memory-partition-remember or memory-cognition-remember tool.
3521
-
3522
- Two lanes, never confused:
3523
- - memory-partition = the OBJECTIVE fact store: external-world facts, factual records, project details, and events the user stated, subjects gathered this turn, or facts the user asked you to remember.
3524
- - memory-cognition = the SUBJECTIVE profile store: every preference, interest, trait, or internal state of the user (stated or inferred) \u2014 YOUR understanding of the user, persona learnings included.
3525
-
3526
- You receive:
3527
- - USER REQUEST: what the user asked.
3528
- - PRIOR MEMORY: facts already stored for this user (may be empty).
3529
- - PROBED THIS TURN: what memory-partition-recall already surfaced for this turn (may be empty) \u2014 already known, never re-store.
3530
- - GATHERED DATA: summarized tool results from this turn (web searches, lookups).
3531
-
3532
- Store into the PARTITION lane (call memory-partition-remember) only when it is durable, objective, and user-specific:
3533
- - A factual record the user states or asks you to track (contact info, a decision, a project detail, an event, their setup \u2014 however phrased, any language).
3534
- - Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.
3535
-
3536
- ROUTING CONSTRAINT (absolute): extract ONLY objective, external facts to the partition. You MUST NOT store user preferences, behavioral traits, or internal states there ("the user likes\u2026", "the user is interested in\u2026", "the user prefers\u2026"). All user profile and persona data is deferred to the cognition tier.
3537
-
3538
- Store into the COGNITION lane (call memory-cognition-remember) whenever the turn yields SUBJECTIVE user data, stated or derived:
3539
- - A preference or interest the user states outright (favorite X, a like or dislike, a style choice) \u2014 stated preferences live HERE, never in the partition.
3540
- - An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.
3541
- - Never an objective fact \u2014 those belong in the partition lane.
3542
-
3543
- STORAGE MECHANICS \u2014 how your memory works (write for the retriever):
3544
- - Each stored record is embedded as a whole AND matched sentence-by-sentence at recall time (multi-variant retrieval). One self-contained fact per call; a single long, dense sentence is fine, but lead with the subject ("Sam's phone number is 555-1234", never "His number is \u2026").
3545
- - Restating a record verbatim OVERWRITES it in place \u2014 updates are restatements of the full corrected statement, not diffs.
3546
- - tags are the ONLY topic-filter vocabulary at recall \u2014 reuse stable, lowercase topic labels (partition lane only). Tags are NARROW and specific: entity names, product names, game titles ("amd", "stellar blade", "stellar blade blood rain").
3547
- - The macro-taxonomy routes a fact into its family hierarchy (partition lane only), top-down: CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE (the NODE is the stored record itself \u2014 never named):
3548
- - category (CLUSTER): ONE lowercase PLURAL family noun \u2014 stocks, games, pets, work, health, finance, contacts \u2026
3549
- - community (COMMUNITY): ONE lowercase PLURAL sub-family narrowing the category ("survival games" under "games", "tv shows" under "shows"); omit when no sub-family applies.
3550
- - subject (HUB): the lowercase SINGULAR main subject entity the fact is about ("project zomboid", "amd", "sam") \u2014 a specific name, never pluralized; always include when the fact is about a specific entity.
3551
- A category or community is NEVER a specific entity, product, company, or game title: "amd" is a subject under the category "stocks"; "stellar blade" is a subject under the category "games"; a show/work title like "breaking-bad" is a tag or hub, never a community. Always include category; reuse the existing labels whenever they fit.
3552
- - PERSONA & FICTION CONTENT (absolute): content about an adopted persona, a roleplay, or a fictional/entertainment work routes by its real-world MEDIUM, never by in-universe domains \u2014 a TV persona's biography, family, or career belongs under the medium family (category "shows", community "tv shows", hub the show's title or the persona name); never "family", "education", "business", or "science" for invented content.
3553
-
3554
- TAXONOMY PROBING (pick first, create if necessary): before naming a tier label you are not certain exists, call memory-taxonomy-probe top-down \u2014 cluster \u2192 community \u2192 hub \u2192 node \u2014 and ADOPT a returned candidate by naming it VERBATIM in the remember call (its id becomes the next probe's parentId). CREATE a new label only when every candidate misses the meaning \u2014 then follow the phrasing rules (plural family/sub-family, singular hub, singular node aspect) and optionally pass an "icon" from the curated set for the label you create. The known-vocabulary section below already lists likely fits; probing confirms them or finds better ones.
3555
-
3556
- Do NOT store:
3557
- - Public facts merely fetched this turn that do not relate to the user (e.g. generic web results).
3558
- - Anything already covered by PRIOR MEMORY or PROBED THIS TURN \u2014 extend or update it via the remember call; do not repeat.
3559
- - Tool artifacts: URLs, search scores, image metadata, raw JSON keys.
3560
- - Inferred, assumed, or extrapolated details about the user that neither their words nor GATHERED DATA support \u2014 if the user did not state it (or clearly imply it), it is not memory; when in doubt, answer "none".
3561
-
3562
- Rules:
3563
- - Each remember call stores ONE self-contained statement (stand-alone, understandable weeks later without this conversation's context).
3564
- - Call each remember tool once per distinct durable item \u2014 no more.
3565
- - If nothing durable surfaced, produce a one-word text answer ("none") and make NO tool call. An empty memory write is a correct outcome, never a failure.`;
3566
- function buildMemoryWritePrompt(params) {
3567
- const vocabulary = buildVocabularySection(params.vocabulary);
3568
- return [
3569
- `USER REQUEST: ${params.userRequest}`,
3570
- `PRIOR MEMORY: ${params.priorMemory?.trim() || "(none stored yet)"}`,
3571
- `PROBED THIS TURN: ${params.probedMemory?.trim() || "(nothing probed this turn)"}`,
3572
- `GATHERED DATA: ${params.gathered?.trim() || "(no tools produced data this turn)"}`,
3573
- vocabulary,
3574
- MEMORY_WRITE_VERDICT
3575
- ].filter(Boolean).join("\n\n");
3576
- }
3577
- var MEMORY_WRITE_VERDICT = 'Decide: store each durable objective fact with one memory-partition-remember call, each subjective user datum (stated or derived) with one memory-cognition-remember call, or answer "none" if the turn surfaced nothing durable about this user.';
3578
3509
  var ResearchFrictionQueryDecisionSchema = z.object({
3579
3510
  /** The friction id — echoed back so the worker maps the verdict to its candidate. */
3580
3511
  id: z.string(),
@@ -3706,16 +3637,7 @@ RULES:
3706
3637
  - No markdown code fences, no explanations, preamble, or postscript.`
3707
3638
  });
3708
3639
  }
3709
- var FACT_KINDS = [
3710
- "preference",
3711
- "decision",
3712
- "state",
3713
- "contact",
3714
- "project",
3715
- "possession",
3716
- "relationship",
3717
- "fact"
3718
- ];
3640
+ var FACT_KINDS = ["decision", "state", "contact", "project", "possession", "relationship", "fact"];
3719
3641
  var FACT_STABILITIES = ["durable", "volatile"];
3720
3642
  var ExtractedFactSchema = z.object({
3721
3643
  /**
@@ -3759,11 +3681,19 @@ var ExtractedFactSchema = z.object({
3759
3681
  stability: z.enum(FACT_STABILITIES)
3760
3682
  });
3761
3683
  var ExtractionSchema = z.object({
3684
+ /**
3685
+ * The verdict, committed BEFORE any record is written: does this text
3686
+ * carry anything worth recalling in a later, unrelated conversation?
3687
+ * `false` is the default outcome for ordinary turns — greetings, answered
3688
+ * questions, one-off requests — and requires facts, tags, category, and
3689
+ * community to all be empty. `true` requires at least one fact.
3690
+ */
3691
+ remember: z.boolean(),
3762
3692
  /**
3763
3693
  * Durable, self-contained facts worth remembering in a later, unrelated
3764
- * conversation (preferences, decisions, contact details, project facts),
3765
- * each carrying its maintenance metadata (subject, category, kind,
3766
- * stability). Empty when nothing in the text is worth remembering.
3694
+ * conversation (decisions, contact details, project facts, events), each
3695
+ * carrying its maintenance metadata (subject, category, kind, stability).
3696
+ * MUST be empty when `remember` is false, non-empty when it is true.
3767
3697
  */
3768
3698
  facts: z.array(ExtractedFactSchema),
3769
3699
  /**
@@ -3803,7 +3733,7 @@ var ExtractionSchema = z.object({
3803
3733
  var USER_SOURCE_VOICE_RULES = `SOURCE VOICE: this extraction source is the USER's own message \u2014 statements in it are the user's voice and may be attributed to the user.`;
3804
3734
  var ASSISTANT_SOURCE_VOICE_RULES = `SOURCE VOICE (absolute): this extraction source is the ASSISTANT's own generated answer \u2014 a flattened digest of its titles, verdicts, and findings \u2014 NOT the user's words.
3805
3735
  - First-person statements, verdicts, scores, recommendations, and "my take" phrasing are the ASSISTANT's voice. NEVER attribute them to the user: no fact of the form "the user thinks / describes / wants / would / decided \u2026" may be drawn from this source.
3806
- - The assistant's opinions, judgments, verdicts, and recommendations are NOT durable objective facts \u2014 never extract them. When the source only conveys the assistant's opinion, return an empty facts array (tags may still label the topic).
3736
+ - The assistant's opinions, judgments, verdicts, and recommendations are NOT durable objective facts \u2014 never extract them. When the source only conveys the assistant's opinion, return remember=false.
3807
3737
  - Extract only objective, checkable world facts the answer asserts, with the subject ENTITY as the hub \u2014 never "user" as the subject of assistant-voice content.
3808
3738
  - Statements about reception or coverage keep their true source ("available coverage of X notes \u2026"), never "the user";`;
3809
3739
  function buildExtractionPrompt(vocabulary = {}, role = "user") {
@@ -3811,14 +3741,17 @@ function buildExtractionPrompt(vocabulary = {}, role = "user") {
3811
3741
  return buildStructuredPrompt(ExtractionSchema, {
3812
3742
  before: "OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:",
3813
3743
  after: `
3814
- YOUR TASK \u2014 decide what is worth remembering:
3815
- ${sourceVoiceRules}
3816
- - ROUTING BOUNDARY (absolute): this extraction feeds the memory partition \u2014 the OBJECTIVE fact store ONLY. Extract only objective, external-world facts and events: factual records, project details, decisions, states, possessions, contacts, relationships between people. You MUST NOT extract subjective user data \u2014 no preferences, likes/dislikes, interests, wants, behavioral traits, or internal states ("the user likes\u2026", "the user is interested in\u2026", "the user prefers\u2026"). All user profile and persona data is deferred to the cognition tier; when the turn reveals ONLY subjective user data, return an empty facts array.
3817
- - A fact is durable, objective information that remains useful in a later, unrelated conversation: decisions, contact details, project facts, technical constraints, events (e.g. "Sam's phone number is 555-1234", "The user is building a vector memory feature", "The payments service migrated to PostgreSQL in November").
3818
- - Be sensitive to the user's data: capture anything durable and objective the turn reveals \u2014 a decision, a constraint, a project detail, a person or subject they care about \u2014 even when it is phrased casually or buried in a longer message. Noticing and storing durable factual data is expected; do not wait for an explicit "remember".
3744
+ YOUR TASK \u2014 decide FIRST whether this text is worth long-term memory, then distill:
3745
+ - VERDICT FIRST (absolute): "remember" is the gate, and it comes first. Set remember=false whenever the text carries nothing worth recalling in a later, unrelated conversation \u2014 greetings, small talk, filler, questions that were merely answered, one-off requests. Most ordinary turns are remember=false. When remember=false, facts, tags, category, and community are ALL empty; remember=true REQUIRES at least one fact.
3746
+ - ONE-OFF REQUESTS ARE NEVER FACTS: a task the user asks the assistant to do right now ("find X", "play Y", "summarize Z") is the current request, not knowledge about anyone. Never emit facts of the form "the user wants to find / watch / buy / do \u2026" \u2014 from "find japanese dark trap music by katame on youtube" there is nothing to store, period. A STANDING preference or interest the request reveals ("the user is into japanese dark trap") is subjective user data \u2014 never emitted here either (see ROUTING BOUNDARY).
3747
+ - ROUTING BOUNDARY (absolute): this extraction feeds the memory partition \u2014 the OBJECTIVE fact store ONLY. Extract only objective, external-world facts and events: factual records, project details, decisions, states, possessions, contacts, relationships between people. You MUST NOT extract subjective user data \u2014 no preferences, likes/dislikes, interests, wants, behavioral traits, or internal states ("the user likes\u2026", "the user is interested in\u2026", "the user prefers\u2026"). All user profile and persona data is deferred to the cognition tier; when the turn reveals ONLY subjective user data, return remember=false.
3748
+ - What IS worth remembering: durable, objective information that remains useful in a later, unrelated conversation \u2014 decisions, contact details, project facts, technical constraints, events (e.g. "Sam's phone number is 555-1234", "The user is building a vector memory feature", "The payments service migrated to PostgreSQL in November").
3749
+ - DROP-BIAS (absolute): when in doubt whether a detail is durable, DROP it. A worthless record pollutes the fact store, the taxonomy, and every future recall; a detail that truly matters will be re-stated another day. Extracting nothing is always better than extracting noise.
3819
3750
  - Facts must be self-contained \u2014 no "this"/"that" references; write them as third-person statements.
3820
3751
  - Storage mechanics: each fact is embedded as a whole and matched sentence-by-sentence at recall time (multi-variant retrieval). One dense sentence is fine \u2014 put the subject up front ("The payments service runs PostgreSQL 16", not "It runs that version").
3821
- - Skip transient content: greetings, small talk, one-off instructions, filler \u2014 anything with no future recall value. When in doubt about whether a detail is durable, keep it: a durable detail is cheaper to store than to lose. When in doubt about whether a detail is SUBJECTIVE, drop it \u2014 the cognition tier captures preferences and profile data.
3752
+ ${sourceVoiceRules}
3753
+ - GATHERED DATA (when the source text is followed by a "GATHERED DATA" section \u2014 this turn's tool results): durable knowledge about subjects the USER cares about may be distilled from it ("Katame is a japanese dark-trap producer releasing on YouTube" counts only when the turn shows the user tracks that artist). Never store tool artifacts \u2014 URLs, search scores, image metadata, raw JSON keys \u2014 and never store public trivia unrelated to the user's subjects.
3754
+ - ATTACHED FILES (when an "ATTACHED FILES" section lists this turn's uploads): distill what a file durably IS when the turn reveals it ("bauplan.pdf is the floor plan for the user's garage conversion") \u2014 never the mere act of uploading, never bare file metadata.
3822
3755
 
3823
3756
  FACT METADATA \u2014 every fact object carries the fields the maintenance passes (consolidate/reflect/conviction) interpret. Labels place the fact in the macro-taxonomy, top-down: CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE \u2192 LEAF, where the LEAF is the fact's text itself and every tier above it is a NAMED label that narrows where it is filed. The chain is strict: a fact is emitted with ALL FOUR labels or not at all.
3824
3757
  - CLUSTER (category): a broad PLURAL family noun ("games", "stocks", "pets").
@@ -3833,7 +3766,6 @@ Fields:
3833
3766
  - category (required): ONE broad lowercase PLURAL family label for this fact \u2014 the CLUSTER tier \u2014 reusing the known vocabulary.
3834
3767
  - community (required): ONE broad lowercase PLURAL sub-family narrowing the fact's category \u2014 the COMMUNITY tier, one level below the cluster (a genre, project family, or domain branch \u2014 "survival-games" under "games").
3835
3768
  - kind (required): what kind of durable thing it is:
3836
- - preference \u2014 RESERVED, never emit: likes, dislikes, wants, and interests are subjective user data owned by the cognition tier (see ROUTING BOUNDARY)
3837
3769
  - decision \u2014 a choice that was made (adoptions, migrations, purchases committed to)
3838
3770
  - state \u2014 the CURRENT, changeable situation (lives in X, uses version Y, runs Z) \u2014 newer statements supersede these
3839
3771
  - contact \u2014 contact details of a person (phone, email, address)
@@ -3842,21 +3774,21 @@ Fields:
3842
3774
  - relationship \u2014 how people relate ("sam is the user's brother")
3843
3775
  - fact \u2014 any other durable fact
3844
3776
  - stability (required): "durable" \u2014 a long-term truth that should survive until contradicted (decisions, traits, history) \u2014 or "volatile" \u2014 a current state a newer statement is EXPECTED to replace (location, tooling, versions). When in doubt, choose durable.
3845
- - Tags: 2 to 6 stable, reusable, lowercase topic labels describing what the text is about (e.g. "work", "rust", "contacts", "amd", "stellar blade"). Tags are NARROW and specific \u2014 entity names, product names, game titles. They are the vocabulary for topic-filtered recall later.
3846
- - Category: ONE broad lowercase PLURAL family noun for the whole text (e.g. "stocks", "pets", "games", "health") \u2014 the CLUSTER tier \u2014 that groups the narrow tags into one topic family. A category is NEVER a specific entity, product, company, or game title: "amd" belongs under "stocks"; "stellar blade" and "stellar blade blood rain" belong under "games". Persona/fictional content follows the PERSONA & FICTION rule above (medium family, not in-universe domains). Always include it when facts are emitted; omit it when nothing durable is found.
3847
- - Community: ONE broad lowercase PLURAL sub-family that narrows the category (e.g. "survival-games", "action-rpgs" under "games"; "tv-shows" under "shows") \u2014 the COMMUNITY tier between the cluster and the hub. Always include it when facts are emitted; never a specific entity, product, or title \u2014 a show/work title like "breaking-bad" is a tag or hub, never a community.
3848
- - If nothing durable is found, return an empty facts array; tags may still label the topic when useful.
3777
+ - Tags: 2 to 6 stable, reusable, lowercase topic labels describing what the text is about (e.g. "work", "rust", "contacts", "amd", "stellar blade"). Tags are NARROW and specific \u2014 entity names, product names, game titles. They are the vocabulary for topic-filtered recall later. Only when remember=true.
3778
+ - Category: ONE broad lowercase PLURAL family noun for the whole text (e.g. "stocks", "pets", "games", "health") \u2014 the CLUSTER tier \u2014 that groups the narrow tags into one topic family. A category is NEVER a specific entity, product, company, or game title: "amd" belongs under "stocks"; "stellar blade" and "stellar blade blood rain" belong under "games". Persona/fictional content follows the PERSONA & FICTION rule above (medium family, not in-universe domains). Only when remember=true.
3779
+ - Community: ONE broad lowercase PLURAL sub-family that narrows the category (e.g. "survival-games", "action-rpgs" under "games"; "tv-shows" under "shows") \u2014 the COMMUNITY tier between the cluster and the hub. Never a specific entity, product, or title \u2014 a show/work title like "breaking-bad" is a tag or hub, never a community. Only when remember=true.
3849
3780
  ${buildVocabularySection(vocabulary)}
3850
- PRIOR MEMORY (when the user message ends with an "ALREADY STORED IN MEMORY" section):
3781
+ PRIOR MEMORY (when the source text ends with an "ALREADY STORED IN MEMORY" section):
3851
3782
  - That section lists facts already stored in YOUR long-term memory from prior turns. NEVER emit a fact already covered there.
3852
3783
  - If this turn refines, corrects, or completes a stored fact, DO emit it \u2014 as one fuller, self-contained restatement (a full restatement of the corrected claim overwrites the old record in place; it is never a diff).
3853
3784
  - A statement that flips or adds negation to a stored fact is NEW information \u2014 always emit it.
3854
- - Everything not covered by the section is extracted as usual.
3785
+ - Everything not covered by the section is judged as usual.
3855
3786
 
3856
3787
  RULES:
3857
3788
  - Return ONLY a single valid JSON object matching the exact schema above.
3789
+ - The "remember" boolean is always present and consistent with the output: false exactly when facts is empty, true exactly when it is not \u2014 and when false, tags, category, and community are empty too.
3858
3790
  - No markdown code fences, no explanations, preamble, or postscript.
3859
- - Never output undefined or null. Both keys are always present (empty array when none applies).
3791
+ - Never output undefined or null. The "remember" and "facts" keys are always present.
3860
3792
 
3861
3793
  FINAL REMINDER:
3862
3794
  - Output ONLY valid JSON matching the exact schema above. No markdown code fences, no explanations, preamble, or postscript.`
@@ -3868,7 +3800,7 @@ Error: ${error}
3868
3800
 
3869
3801
  Return ONLY a single valid JSON object matching the extraction schema exactly:
3870
3802
  ${formatZodShape(ExtractionSchema)}
3871
- All object keys must be quoted with double quotes. Per fact, "subject", "node", "category", and "community" are required alongside "kind" and "stability".
3803
+ All object keys must be quoted with double quotes. "remember" is always required and must be true exactly when facts is non-empty, false when it is empty. Per fact, "subject", "node", "category", and "community" are required alongside "kind" and "stability".
3872
3804
  Do not add markdown code fences, explanations, placeholders, or extra text.
3873
3805
 
3874
3806
  FINAL REMINDER:
@@ -3902,4 +3834,4 @@ Compose the response from the snippets below. Include every snippet you can subs
3902
3834
  ${parts.join("\n\n")}`;
3903
3835
  }
3904
3836
 
3905
- export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, DEFAULT_VARIANT_ID, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, ENCYCLOPEDIA_INGEST_TRIAGE_INSTRUCTIONS, FINAL_REMINDER, FRICTION_INSTRUCTIONS, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, MEMORY_CLUSTER_INSTRUCTIONS, MEMORY_CONSOLIDATE_INSTRUCTIONS, MEMORY_PROFILE_INSTRUCTIONS, MEMORY_WRITE_INSTRUCTIONS, MERGE_MEDIA_RULES, MERGE_TOPIC_RULE, MULTIMODAL_POLICY, NOISE_RULES, OCR_INSTRUCTIONS, OCR_VERBATIM_INSTRUCTIONS, PRECEDENCE_RULES, PRODUCT_INSTRUCTIONS, RESEARCH_FRICTION_QUERY_INSTRUCTIONS, RESEARCH_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, TAXONOMY_RECONCILE_INSTRUCTIONS, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TEXT_OPINION_INSTRUCTIONS, TOOL_RESULTS_RULES, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildDescribePdfPagePrompt, buildEncyclopediaClassifyPrompt, buildEncyclopediaIngestTriagePrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchFrictionQueryPrompt, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, buildSynopsisProbeSection, buildTaxonomyPairPrompt, buildTaxonomyReconcileSystemPrompt, buildToolExecutePrompt, buildVocabularySection, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatCurrentTimestamp, formatProvenanceLine, formatToolAvailabilityCatalog, formatVariantCatalog, gallerySnippet, getSnippetTemplateKeys, getSnippetTemplateSchema, headerArticleSnippet, headerNewsSnippet, heroMediaSnippet, internationalCoverageSnippet, introductionSnippet, isSnippetTemplate, keyFindingsSnippet, languageCorrectionPrompt, leadSnippet, mergePreset, mergedEvaluationsSnippet, newsKeyFindingsSnippet, newsPreset, quoteSnippet, reasoningSnippet, relatedStoriesSnippet, resolveLanguageName, resolveVariantInstructions, responseLayoutSchema, sourcesSnippet, subjectSchema, subjectsSnippet, summarySnippet, verdictSpineSnippet, videoGallerySnippet };
3837
+ export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, DEFAULT_VARIANT_ID, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, ENCYCLOPEDIA_INGEST_TRIAGE_INSTRUCTIONS, FINAL_REMINDER, FRICTION_INSTRUCTIONS, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, MEMORY_CLUSTER_INSTRUCTIONS, MEMORY_CONSOLIDATE_INSTRUCTIONS, MEMORY_PROFILE_INSTRUCTIONS, MERGE_MEDIA_RULES, MERGE_TOPIC_RULE, MULTIMODAL_POLICY, NOISE_RULES, OCR_INSTRUCTIONS, OCR_VERBATIM_INSTRUCTIONS, PRECEDENCE_RULES, PRODUCT_INSTRUCTIONS, RESEARCH_FRICTION_QUERY_INSTRUCTIONS, RESEARCH_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, TAXONOMY_RECONCILE_INSTRUCTIONS, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TEXT_OPINION_INSTRUCTIONS, TOOL_RESULTS_RULES, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildDescribePdfPagePrompt, buildEncyclopediaClassifyPrompt, buildEncyclopediaIngestTriagePrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchFrictionQueryPrompt, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, buildSynopsisProbeSection, buildTaxonomyPairPrompt, buildTaxonomyReconcileSystemPrompt, buildToolExecutePrompt, buildVocabularySection, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatCurrentTimestamp, formatProvenanceLine, formatToolAvailabilityCatalog, formatVariantCatalog, gallerySnippet, getSnippetTemplateKeys, getSnippetTemplateSchema, headerArticleSnippet, headerNewsSnippet, heroMediaSnippet, internationalCoverageSnippet, introductionSnippet, isSnippetTemplate, keyFindingsSnippet, languageCorrectionPrompt, leadSnippet, mergePreset, mergedEvaluationsSnippet, newsKeyFindingsSnippet, newsPreset, quoteSnippet, reasoningSnippet, relatedStoriesSnippet, resolveLanguageName, resolveVariantInstructions, responseLayoutSchema, sourcesSnippet, subjectSchema, subjectsSnippet, summarySnippet, verdictSpineSnippet, videoGallerySnippet };
@@ -1,7 +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
- import { F as FormatZodShapeOptions } from '../format-zod-shape.types-iJugcVmt.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-iJugcVmt.js';
3
+ import { F as FormatZodShapeOptions } from '../format-zod-shape.types-pA32lgh8.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-pA32lgh8.js';
5
5
 
6
6
  declare const BLOCKED_IMAGE_HOSTS: Set<string>;
7
7
 
@@ -244,7 +244,7 @@ declare const MemoryEnrichmentSchema: z.ZodObject<{
244
244
  }, z.core.$strip>;
245
245
  type MemoryEnrichment = z.infer<typeof MemoryEnrichmentSchema>;
246
246
 
247
- declare const FACT_KINDS: readonly ["preference", "decision", "state", "contact", "project", "possession", "relationship", "fact"];
247
+ declare const FACT_KINDS: readonly ["decision", "state", "contact", "project", "possession", "relationship", "fact"];
248
248
  declare const FACT_STABILITIES: readonly ["durable", "volatile"];
249
249
  declare const ExtractedFactSchema: z.ZodObject<{
250
250
  text: z.ZodString;
@@ -253,7 +253,6 @@ declare const ExtractedFactSchema: z.ZodObject<{
253
253
  category: z.ZodString;
254
254
  community: z.ZodString;
255
255
  kind: z.ZodEnum<{
256
- preference: "preference";
257
256
  decision: "decision";
258
257
  state: "state";
259
258
  contact: "contact";
@@ -269,6 +268,7 @@ declare const ExtractedFactSchema: z.ZodObject<{
269
268
  }, z.core.$strip>;
270
269
  type ExtractedFact = z.infer<typeof ExtractedFactSchema>;
271
270
  declare const ExtractionSchema: z.ZodObject<{
271
+ remember: z.ZodBoolean;
272
272
  facts: z.ZodArray<z.ZodObject<{
273
273
  text: z.ZodString;
274
274
  subject: z.ZodString;
@@ -276,7 +276,6 @@ declare const ExtractionSchema: z.ZodObject<{
276
276
  category: z.ZodString;
277
277
  community: z.ZodString;
278
278
  kind: z.ZodEnum<{
279
- preference: "preference";
280
279
  decision: "decision";
281
280
  state: "state";
282
281
  contact: "contact";
@@ -129,16 +129,16 @@ function categorizeTools(toolNames) {
129
129
  // src/schemas/helpers/tools/tool-registry.constant.ts
130
130
  var VARIANT_NAMES = ["grayscale", "denoised", "sharpened", "clahe"];
131
131
  var TOOL_DESCRIPTIONS = {
132
- 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.",
132
+ brightDataWebSearch: "Search the web using Bright Data SERP API (Google). Returns at most the top 3 organic results per call (titles, snippets, links) \u2014 a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year) for fresh results.",
133
133
  brightDataImageSearch: "Search for images using Bright Data SERP API (Google Images). Returns image URLs, source pages, and dimensions. Enforces a minimum of 1280\xD7720 (720p).",
134
- brightDataNewsSearch: "Search latest news using Bright Data SERP API. Returns headlines, sources, dates, and snippets. Supports an optional recency window (day/week/month/year).",
134
+ brightDataNewsSearch: "Search latest news using Bright Data SERP API \u2014 at most the top 3 results per call (headlines, sources, dates, snippets), so a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year).",
135
135
  brightDataPlacesSearch: "Search places and businesses using Bright Data SERP API (Google Maps). Returns addresses, phone numbers, ratings, review counts, and coordinates. Query with a business name or business type plus location.",
136
136
  brightDataShoppingSearch: "Search for products using Bright Data SERP API (Google Shopping). Returns prices, sellers, images, and ratings. Query with the bare product name and model number.",
137
137
  brightDataVideoSearch: `Search for videos using Bright Data SERP API. Returns titles, links, channel names, duration, and publish dates. Supports an optional recency window (day/week/month/year) for fresh results. ${EMBEDDABLE_VIDEO_PROVIDER_CLAUSE}`,
138
138
  brightDataWebpageScrape: "Fetch and render a full webpage using Bright Data Web Unlocker API. Returns clean Markdown text. Use for pages behind anti-bot protection that plain fetch cannot reach.",
139
- serperWebSearch: "Search the web using Serper.dev (Google). Returns organic results with titles, snippets, and links. Supports an optional recency window (day/week/month/year) for fresh results.",
139
+ serperWebSearch: "Search the web using Serper.dev (Google). Returns at most the top 3 organic results per call (titles, snippets, links) \u2014 a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year) for fresh results.",
140
140
  serperImageSearch: "Search for images using Serper.dev (Google Images). Prefers 2560\xD71440 (1440p) images and enforces a minimum of 1280\xD7720 (720p) via the Google Images tbs size filter and a client-side dimension filter. Supports an optional recency window (day/week/month/year).",
141
- serperNewsSearch: "Search latest news using Serper.dev. Returns headlines, sources, dates, and snippets. Supports an optional recency window (day/week/month/year).",
141
+ serperNewsSearch: "Search latest news using Serper.dev \u2014 at most the top 3 results per call (headlines, sources, dates, snippets), so a request spanning distinct topics needs one call per topic. Supports an optional recency window (day/week/month/year).",
142
142
  serperPlacesSearch: "Search places and businesses using Serper.dev (Google Maps). Returns addresses, phone numbers, ratings, review counts, and coordinates. Query with a business name or business type plus location.",
143
143
  serperShoppingSearch: "Search for products using Serper.dev (Google Shopping). Returns prices, sellers, delivery info, images, and per-offer ratings. Query with the bare product name and model number.",
144
144
  serperBusinessReviewsSearch: "Fetch Google Maps reviews for a specific business or place using Serper.dev. Returns reviewer snippets with author names, star ratings, and dates. Use for seller/business reputation, not editorial product reviews.",
@@ -152,7 +152,7 @@ var TOOL_DESCRIPTIONS = {
152
152
  eodhdIntraday: "Fetch intraday OHLCV bars for an EODHD ticker and return a per-day, per-price-band volume profile as chartData for the client heatmap. Use to render a volume heatmap across fixed price bands.",
153
153
  eodhdNews: "Fetch recent financial news for an EODHD ticker \u2014 headlines, links, sources, publish dates. Use to ground a stock-market answer in what is happening around a company.",
154
154
  eodhdFundamentals: "Fetch company fundamentals for an EODHD ticker \u2014 general info, valuation, and key financial highlights (sector, market cap, P/E, revenue, margins).",
155
- webFetch: "Fetch the full content of a specific URL (e.g. a search result page) as clean Markdown. Prefer fetching the most relevant search results to ground the answer in full source text rather than relying on snippets alone.",
155
+ webFetch: "Fetch the full content of a specific URL (e.g. a search result page) as clean Markdown. The top 3 web/news search results are fetched automatically when no fetch tool is selected \u2014 use this only for a specific page beyond those, when full source text is needed beyond the snippets.",
156
156
  browser_navigate: "Control a real browser: navigate to a URL. Use for interactive browsing \u2014 JS-heavy pages, content behind clicks, tabs, scrolling, or forms \u2014 that static search/fetch cannot reach. Follow up with browser_snapshot to read the page before acting on it.",
157
157
  browser_navigate_back: "Go back to the previous page in the browser history.",
158
158
  browser_snapshot: "Read the current browser page as an accessibility snapshot (structured text with element refs). The primary way to see page content and obtain the refs that browser_click/browser_type need.",
@@ -172,10 +172,8 @@ var TOOL_DESCRIPTIONS = {
172
172
  requestDenoised: "Request a denoised (blurred) version of the images. Use when the original has noise, grain, or artifacts that hide details.",
173
173
  requestSharpened: "Request a sharpened version of the images. Use when edges or fine details are blurry.",
174
174
  requestClahe: "Request a CLAHE (contrast-enhanced) version of the images. Use when details are hidden in shadows or highlights.",
175
- "memory-partition-remember": `Store into the user's fact partition (memory-partition) \u2014 OBJECTIVE facts only: notable external-world facts about subjects they care about (projects, followed stocks, people, past topics), objective details they state (contact info, decisions, constraints), and objective facts they explicitly ask you to remember. Subjective user data (preferences, interests, traits, internal states) belongs to memory-cognition-remember, never here. Storing gathered knowledge is expected \u2014 do not wait for an explicit "remember" instruction.`,
176
175
  "memory-partition-recall": "Retrieve from the user's fact partition (memory-partition) \u2014 things they told you in past conversations or asked you to remember. These are trusted user statements, not public facts; attribute them to the user and prefer them over web results for anything personal. Check this tool whenever a request touches a subject this user has cared about before.",
177
176
  "memory-partition-delete": "Delete one exact fact record from the user's fact partition (memory-partition), quoted verbatim from a memory-partition-recall result. Never delete on a guess: recall first, delete the verbatim statement. Needs memory-partition-recall alongside it.",
178
- "memory-cognition-remember": "Store one insight into your cognition space (memory-cognition) \u2014 the exclusive store for subjective user data: preferences and interests the user states, inferred traits, standing interests, working nuances, connections between facts. Objective facts (contact info, decisions, project details, events) belong in memory-partition-remember.",
179
177
  "memory-cognition-delete": 'Delete one targeted piece of your cognition space (memory-cognition): a verbatim stored insight (quoted from your cognition context) and/or one standing profile topic by its path ("likes.jazz"). The per-item forget for subjective user data; memory-cognition-forget is the whole-space wipe.',
180
178
  "memory-cognition-forget": "Wipe your entire cognition space (memory-cognition) of the user \u2014 the structured profile AND every derived insight \u2014 only when the user asks you to forget your learned understanding of them or to start over. Fact records in the partition are untouched."
181
179
  };
@@ -197,10 +195,8 @@ var BROWSER_TOOL_NAMES = [
197
195
  "browser_verify_text_visible"
198
196
  ];
199
197
  var MEMORY_TOOL_NAMES = [
200
- "memory-partition-remember",
201
198
  "memory-partition-recall",
202
199
  "memory-partition-delete",
203
- "memory-cognition-remember",
204
200
  "memory-cognition-delete",
205
201
  "memory-cognition-forget"
206
202
  ];
@@ -234,10 +230,8 @@ var TOOL_NAMES = [
234
230
  "requestDenoised",
235
231
  "requestSharpened",
236
232
  "requestClahe",
237
- "memory-partition-remember",
238
233
  "memory-partition-recall",
239
234
  "memory-partition-delete",
240
- "memory-cognition-remember",
241
235
  "memory-cognition-forget",
242
236
  ...BROWSER_TOOL_NAMES
243
237
  ];
@@ -615,16 +609,7 @@ var MemoryEnrichmentSchema = z.object({
615
609
  */
616
610
  tags: z.array(z.string())
617
611
  });
618
- var FACT_KINDS = [
619
- "preference",
620
- "decision",
621
- "state",
622
- "contact",
623
- "project",
624
- "possession",
625
- "relationship",
626
- "fact"
627
- ];
612
+ var FACT_KINDS = ["decision", "state", "contact", "project", "possession", "relationship", "fact"];
628
613
  var FACT_STABILITIES = ["durable", "volatile"];
629
614
  var ExtractedFactSchema = z.object({
630
615
  /**
@@ -668,11 +653,19 @@ var ExtractedFactSchema = z.object({
668
653
  stability: z.enum(FACT_STABILITIES)
669
654
  });
670
655
  var ExtractionSchema = z.object({
656
+ /**
657
+ * The verdict, committed BEFORE any record is written: does this text
658
+ * carry anything worth recalling in a later, unrelated conversation?
659
+ * `false` is the default outcome for ordinary turns — greetings, answered
660
+ * questions, one-off requests — and requires facts, tags, category, and
661
+ * community to all be empty. `true` requires at least one fact.
662
+ */
663
+ remember: z.boolean(),
671
664
  /**
672
665
  * Durable, self-contained facts worth remembering in a later, unrelated
673
- * conversation (preferences, decisions, contact details, project facts),
674
- * each carrying its maintenance metadata (subject, category, kind,
675
- * stability). Empty when nothing in the text is worth remembering.
666
+ * conversation (decisions, contact details, project facts, events), each
667
+ * carrying its maintenance metadata (subject, category, kind, stability).
668
+ * MUST be empty when `remember` is false, non-empty when it is true.
676
669
  */
677
670
  facts: z.array(ExtractedFactSchema),
678
671
  /**
@@ -416,25 +416,6 @@ interface MemoryCognitionForgetDeps {
416
416
  }
417
417
  declare function createMemoryCognitionForgetTool(deps: MemoryCognitionForgetDeps): Tool;
418
418
 
419
- declare const memoryCognitionRememberSchema: z.ZodObject<{
420
- text: z.ZodString;
421
- path: z.ZodOptional<z.ZodString>;
422
- }, z.core.$strip>;
423
- type MemoryCognitionRememberInput = z.infer<typeof memoryCognitionRememberSchema>;
424
-
425
- interface MemoryCognitionRememberDeps {
426
- scope: MemoryToolScope;
427
- storeInsight: (input: {
428
- memoryCognition: string;
429
- sessionId?: string;
430
- conversationId?: string;
431
- requestId?: string;
432
- text: string;
433
- path?: string;
434
- }) => Promise<string>;
435
- }
436
- declare function createMemoryCognitionRememberTool(deps: MemoryCognitionRememberDeps): Tool;
437
-
438
419
  declare const memoryPartitionDeleteSchema: z.ZodObject<{
439
420
  text: z.ZodString;
440
421
  }, z.core.$strip>;
@@ -473,41 +454,12 @@ interface MemoryPartitionRecallDeps {
473
454
  }
474
455
  declare function createMemoryPartitionRecallTool(deps: MemoryPartitionRecallDeps): Tool;
475
456
 
476
- declare const memoryPartitionRememberSchema: z.ZodObject<{
477
- text: z.ZodString;
478
- category: z.ZodString;
479
- community: z.ZodString;
480
- subject: z.ZodString;
481
- node: z.ZodString;
482
- icon: z.ZodOptional<z.ZodString>;
483
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
484
- }, z.core.$strip>;
485
- type MemoryPartitionRememberInput = z.infer<typeof memoryPartitionRememberSchema>;
486
-
487
- interface MemoryPartitionRememberDeps {
488
- scope: MemoryToolScope;
489
- storeRecord: (input: {
490
- memoryPartition: string;
491
- sessionId?: string;
492
- conversationId?: string;
493
- requestId?: string;
494
- text: string;
495
- tags?: string[];
496
- category: string;
497
- community: string;
498
- subject: string;
499
- node: string;
500
- icon?: string;
501
- }) => Promise<string>;
502
- }
503
- declare function createMemoryPartitionRememberTool(deps: MemoryPartitionRememberDeps): Tool;
504
-
505
457
  declare const memoryTaxonomyProbeSchema: z.ZodObject<{
506
458
  kind: z.ZodEnum<{
507
- community: "community";
508
- node: "node";
509
459
  cluster: "cluster";
460
+ community: "community";
510
461
  hub: "hub";
462
+ node: "node";
511
463
  }>;
512
464
  query: z.ZodString;
513
465
  parentId: z.ZodOptional<z.ZodString>;
@@ -806,4 +758,4 @@ interface VideoStats {
806
758
  lang?: string;
807
759
  }
808
760
 
809
- 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 };
761
+ 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 MemoryPartitionDeleteInput, type MemoryPartitionRecallInput, 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, createMemoryPartitionDeleteTool, createMemoryPartitionRecallTool, createMemoryTaxonomyProbeTool, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionDeleteSchema, memoryCognitionForgetSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryTaxonomyProbeSchema, pickMerchantResult, requestBrightData, resolveSerperShopOfferLinks, serperBusinessReviewsSearchSchema, serperImageSearchSchema, serperNewsSearchSchema, serperPlacesSearchSchema, serperShoppingSearchSchema, serperVideoSearchSchema, serperWebSearchSchema, serperWebpageScrapeSchema, storeHostToken, summarizeContent, summarizeFound, summarizeResults, tbsSizeLabelForPixels, variantRequestSchema, webFetchSchema, withSummary, youtubeVideoSearchSchema };
@@ -342,6 +342,9 @@ var brightDataNewsSearchSchema = z.object({
342
342
  lang: z.string().optional().describe("Two-letter ISO language code for result preference (e.g. en, de, ja)")
343
343
  });
344
344
 
345
+ // src/tools/constants/search-results-cap.constant.ts
346
+ var SEARCH_API_RESULTS_CAP = 3;
347
+
345
348
  // src/tools/bright-data/helpers/map-bright-data-news-result.helper.ts
346
349
  function mapBrightDataNewsResult(r) {
347
350
  return {
@@ -357,7 +360,7 @@ function mapBrightDataNewsResult(r) {
357
360
  // src/tools/bright-data/news-search.tool.ts
358
361
  function createBrightDataNewsSearch(deps) {
359
362
  return tool({
360
- description: 'Search the latest news using Bright Data SERP API. Returns headlines, sources, dates, and snippets. Pass recency ("day"|"week"|"month"|"year") to restrict to a recent period. ' + STANDALONE_QUERY_TOOL_CLAUSE,
363
+ description: 'Search the latest news using Bright Data SERP API. Returns headlines, sources, dates, and snippets \u2014 at most the top 3 per call, so cover each distinct topic with its own call. Pass recency ("day"|"week"|"month"|"year") to restrict to a recent period. ' + STANDALONE_QUERY_TOOL_CLAUSE,
361
364
  inputSchema: brightDataNewsSearchSchema,
362
365
  execute: async ({ query, count: reqCount, recency, lang }) => {
363
366
  const cfg = deps.getLiveConfig().brightData;
@@ -367,12 +370,18 @@ function createBrightDataNewsSearch(deps) {
367
370
  const body = {};
368
371
  applyLocaleParams(body, lang ?? deps.defaultLang);
369
372
  applyRecencyParam(body, recency);
373
+ const num = Math.min(reqCount ?? cfg.news.results, SEARCH_API_RESULTS_CAP);
374
+ if (num < (reqCount ?? cfg.news.results)) {
375
+ deps.logger.warn(
376
+ `Bright Data news results clamped to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff) for "${query}"`
377
+ );
378
+ }
370
379
  const url = buildGoogleUrl(query, {
371
380
  tbm: "nws",
372
381
  hl: body.hl,
373
382
  gl: body.gl,
374
383
  tbs: body.tbs,
375
- num: reqCount ?? cfg.news.results
384
+ num
376
385
  });
377
386
  try {
378
387
  const data = await requestBrightData(apiKey, cfg.serpZone, url, {
@@ -429,11 +438,17 @@ function createBrightDataPlacesSearch(deps) {
429
438
  deps.logger.log(`Bright Data places search for "${query}"`);
430
439
  const body = {};
431
440
  applyLocaleParams(body, lang ?? deps.defaultLang);
441
+ const num = Math.min(reqCount ?? cfg.places.results, SEARCH_API_RESULTS_CAP);
442
+ if (num < (reqCount ?? cfg.places.results)) {
443
+ deps.logger.warn(
444
+ `Bright Data places results clamped to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff) for "${query}"`
445
+ );
446
+ }
432
447
  const url = buildGoogleUrl(query, {
433
448
  tbm: "lcl",
434
449
  hl: body.hl,
435
450
  gl: body.gl,
436
- num: reqCount ?? cfg.places.results
451
+ num
437
452
  });
438
453
  try {
439
454
  const data = await requestBrightData(apiKey, cfg.serpZone, url, {
@@ -489,11 +504,17 @@ function createBrightDataShoppingSearch(deps) {
489
504
  deps.logger.log(`Bright Data shopping search for "${query}"`);
490
505
  const body = {};
491
506
  applyLocaleParams(body, lang ?? deps.defaultLang);
507
+ const num = Math.min(reqCount ?? cfg.shopping.results, SEARCH_API_RESULTS_CAP);
508
+ if (num < (reqCount ?? cfg.shopping.results)) {
509
+ deps.logger.warn(
510
+ `Bright Data shopping results clamped to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff) for "${query}"`
511
+ );
512
+ }
492
513
  const url = buildGoogleUrl(query, {
493
514
  udm: 28,
494
515
  hl: body.hl,
495
516
  gl: body.gl,
496
- num: reqCount ?? cfg.shopping.results
517
+ num
497
518
  });
498
519
  try {
499
520
  const data = await requestBrightData(apiKey, cfg.serpZone, url, {
@@ -647,7 +668,7 @@ function mapBrightDataWebResult(r) {
647
668
  // src/tools/bright-data/web-search.tool.ts
648
669
  function createBrightDataWebSearch(deps) {
649
670
  return tool({
650
- description: 'Search the web using Bright Data SERP API (Google). Returns organic results with titles, snippets, and links. Pass recency ("day"|"week"|"month"|"year") to restrict to fresh results. ' + STANDALONE_QUERY_TOOL_CLAUSE,
671
+ description: 'Search the web using Bright Data SERP API (Google). Returns organic results with titles, snippets, and links \u2014 at most the top 3 per call, so cover each distinct topic or entity with its own call. Pass recency ("day"|"week"|"month"|"year") to restrict to fresh results. ' + STANDALONE_QUERY_TOOL_CLAUSE,
651
672
  inputSchema: brightDataWebSearchSchema,
652
673
  execute: async ({ query, recency, lang }) => {
653
674
  const cfg = deps.getLiveConfig().brightData;
@@ -657,11 +678,17 @@ function createBrightDataWebSearch(deps) {
657
678
  const body = {};
658
679
  applyLocaleParams(body, lang ?? deps.defaultLang);
659
680
  applyRecencyParam(body, recency);
681
+ const num = Math.min(cfg.web.results, SEARCH_API_RESULTS_CAP);
682
+ if (num < cfg.web.results) {
683
+ deps.logger.warn(
684
+ `Bright Data web results clamped from ${cfg.web.results} to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff)`
685
+ );
686
+ }
660
687
  const url = buildGoogleUrl(query, {
661
688
  hl: body.hl,
662
689
  gl: body.gl,
663
690
  tbs: body.tbs,
664
- num: cfg.web.results
691
+ num
665
692
  });
666
693
  try {
667
694
  const data = await requestBrightData(apiKey, cfg.serpZone, url, {
@@ -975,8 +1002,8 @@ var defaultSummarize = (data) => {
975
1002
  };
976
1003
 
977
1004
  // src/tools/helpers/with-summary.helper.ts
978
- function withSummary(tool28, summarize = defaultSummarize) {
979
- const t = tool28;
1005
+ function withSummary(tool26, summarize = defaultSummarize) {
1006
+ const t = tool26;
980
1007
  t.summarize = summarize;
981
1008
  return t;
982
1009
  }
@@ -1060,38 +1087,6 @@ function createMemoryCognitionForgetTool(deps) {
1060
1087
  }
1061
1088
  });
1062
1089
  }
1063
- var memoryCognitionRememberSchema = z.object({
1064
- text: z.string().min(1).max(2e3).describe(
1065
- 'The derived insight to store, as one self-contained third-person sentence, e.g. "The user prefers single-line if statements".'
1066
- ),
1067
- path: z.string().min(1).max(200).optional().describe(
1068
- 'Optional profile facet this insight deepens, e.g. "likes.cars" \u2014 only when it deepens a stored profile value.'
1069
- )
1070
- });
1071
- function createMemoryCognitionRememberTool(deps) {
1072
- return tool({
1073
- description: 'Store one insight into your cognition space (memory-cognition) \u2014 the exclusive store for SUBJECTIVE user data: preferences and interests the user STATES ("the user likes\u2026", "the user is interested in\u2026") plus what you LEARN about them (inferred traits, standing interests, working nuances, connections between facts). Objective facts (contact info, decisions, project details, events) belong in memory-partition-remember, never here. One self-contained third-person sentence per call, lead with the topic. Optionally attach a path (e.g. "likes.cars") when the insight deepens a stored profile value. Restating an insight verbatim updates it in place.',
1074
- inputSchema: memoryCognitionRememberSchema,
1075
- execute: async ({ text, path }) => {
1076
- try {
1077
- const id = await deps.storeInsight({
1078
- memoryCognition: deps.scope.memoryCognition ?? deps.scope.memoryPartition,
1079
- sessionId: deps.scope.sessionId,
1080
- conversationId: deps.scope.conversationId,
1081
- requestId: deps.scope.requestId,
1082
- text,
1083
- path
1084
- });
1085
- return { stored: true, id };
1086
- } catch (error) {
1087
- return {
1088
- stored: false,
1089
- error: error instanceof Error ? error.message : "cognition store failed"
1090
- };
1091
- }
1092
- }
1093
- });
1094
- }
1095
1090
  var memoryPartitionDeleteSchema = z.object({
1096
1091
  text: z.string().min(3).max(2e3).describe(
1097
1092
  "The exact stored statement to delete, quoted verbatim from a memory-partition-recall result. Record texts are the record identity \u2014 no ids needed. Never paraphrase: recall first, then delete the exact text."
@@ -1152,56 +1147,6 @@ ${lines.join("\n")}`;
1152
1147
  }
1153
1148
  });
1154
1149
  }
1155
- var memoryPartitionRememberSchema = z.object({
1156
- text: z.string().min(1).max(2e3).describe('The fact to remember, as a self-contained statement, e.g. "Sams phone number is 555-1234".'),
1157
- category: z.string().min(1).max(40).describe(
1158
- 'One broad lowercase PLURAL category the fact belongs to, e.g. "stocks", "games", "pets", "work" \u2014 the CLUSTER tier: a family noun, never a specific entity/product/company/game name ("amd" \u2192 "stocks"; "stellar blade" \u2192 "games"). Persona/roleplay or fictional content classifies by its real-world medium (a TV persona\u2019s biography \u2192 "shows"), never by in-universe domains ("family", "education", "business" describe reality, not an invented life). Always include it.'
1159
- ),
1160
- community: z.string().min(1).max(60).describe(
1161
- 'One lowercase PLURAL sub-family narrowing the category, e.g. "survival games" under "games", "tv shows" under "shows" \u2014 the COMMUNITY tier, one level below the cluster (a genre, project family, or domain branch). Always present; never a specific entity, product, or title \u2014 a show/work title like "breaking-bad" is a hub, never a community.'
1162
- ),
1163
- subject: z.string().min(1).max(40).describe(
1164
- 'The lowercase SINGULAR entity the fact is about \u2014 the HUB tier, e.g. "project zomboid", "amd", "sam". Name it whenever the fact is about a specific entity; never a plural family label.'
1165
- ),
1166
- node: z.string().min(1).max(120).describe(
1167
- 'The lowercase SINGULAR aspect the fact addresses under its hub \u2014 the NODE tier, e.g. "base building" under "project zomboid", "ryzen 9950x3d" under "amd". Reuse existing labels whenever they fit; never pluralized, never a sentence.'
1168
- ),
1169
- icon: z.string().min(1).max(64).optional().describe(
1170
- 'Lucide icon name for a label you are CREATING in this call (attached to the deepest NEW label: subject first, then community, then category). Only from the curated taxonomy icon set (e.g. "gamepad-2", "book-open", "paw-print"); omit entirely when you adopt existing labels or no icon fits.'
1171
- ),
1172
- tags: z.array(z.string().min(1).max(40)).max(8).optional().describe(
1173
- 'Optional topic labels (lowercase, reusable, NARROW \u2014 entity/product/game names) so future recall can filter by topic, e.g. ["contacts", "sam"], ["amd"], ["stellar blade"].'
1174
- )
1175
- });
1176
- function createMemoryPartitionRememberTool(deps) {
1177
- return tool({
1178
- description: 'Store into the user\'s fact partition (memory-partition) \u2014 OBJECTIVE facts only: notable external-world facts about subjects they care about (projects, followed stocks, games, people, past topics), objective details they state as fact (contact info, decisions, constraints, their setup), and objective facts they explicitly ask you to remember. You MUST NOT store subjective user data here \u2014 preferences, interests, likes/dislikes, behavioral traits, or internal states ("the user likes\u2026") belong to the cognition tier (memory-cognition-remember). Storing gathered knowledge is expected \u2014 do not wait for an explicit "remember" instruction. This memory outlives the conversation and is recalled later with memory-partition-recall. STORAGE MECHANICS: each record is embedded as a whole and matched sentence-by-sentence at recall time \u2014 write ONE self-contained statement per call (a single dense sentence is fine, subject up front), restating a record verbatim updates it in place, tags are the recall filter vocabulary (lowercase, reusable), and the macro-taxonomy routes each record down its strict chain: `category` one broad PLURAL family label (games, pets, work, health \u2026 \u2014 the cluster tier), `community` one PLURAL sub-family under it (survival games, action rpgs \u2026), `subject` the SINGULAR entity the fact is about (project zomboid, amd, sam \u2026 \u2014 the hub tier), `node` the SINGULAR aspect under the hub (base building, ryzen 9950x3d \u2026 \u2014 the node tier). ALL FOUR labels are always required; reuse existing labels whenever they fit.',
1179
- inputSchema: memoryPartitionRememberSchema,
1180
- execute: async ({ text, tags, category, community, subject, node, icon }) => {
1181
- try {
1182
- const id = await deps.storeRecord({
1183
- memoryPartition: deps.scope.memoryPartition,
1184
- sessionId: deps.scope.sessionId,
1185
- conversationId: deps.scope.conversationId,
1186
- requestId: deps.scope.requestId,
1187
- text,
1188
- tags,
1189
- category,
1190
- community,
1191
- subject,
1192
- node,
1193
- icon
1194
- });
1195
- return { stored: true, id };
1196
- } catch (error) {
1197
- return {
1198
- stored: false,
1199
- error: error instanceof Error ? error.message : "memory store failed"
1200
- };
1201
- }
1202
- }
1203
- });
1204
- }
1205
1150
  var memoryTaxonomyProbeSchema = z.object({
1206
1151
  kind: z.enum(["cluster", "community", "hub", "node"]).describe(
1207
1152
  "Which tier to probe. Top-down order: cluster (PLURAL family noun) \u2192 community (PLURAL sub-family under one cluster) \u2192 hub (SINGULAR main subject entity) \u2192 node (SINGULAR aspect under the hub)."
@@ -1410,6 +1355,16 @@ var serperNewsSearchSchema = z.object({
1410
1355
  lang: z.string().optional().describe("Two-letter ISO language code for result preference (e.g. en, de, ja)")
1411
1356
  });
1412
1357
 
1358
+ // src/tools/helpers/is-google-goto-link.helper.ts
1359
+ function isGoogleGotoLink(url) {
1360
+ try {
1361
+ const parsed = new URL(url);
1362
+ return /(^|\.)google\.[a-z.]+$/.test(parsed.hostname.toLowerCase()) && parsed.pathname === "/goto";
1363
+ } catch {
1364
+ return false;
1365
+ }
1366
+ }
1367
+
1413
1368
  // src/tools/serper/helpers/map-serper-news-result.helper.ts
1414
1369
  function mapSerperNewsResult(r) {
1415
1370
  return {
@@ -1425,7 +1380,7 @@ function mapSerperNewsResult(r) {
1425
1380
  // src/tools/serper/news-search.tool.ts
1426
1381
  function createSerperNewsSearch(deps) {
1427
1382
  return tool({
1428
- description: 'Search the latest news using Serper.dev. Returns headlines, sources, dates, and snippets. Pass recency ("day"|"week"|"month"|"year") to restrict to a recent period. ' + STANDALONE_QUERY_TOOL_CLAUSE,
1383
+ description: 'Search the latest news using Serper.dev. Returns headlines, sources, dates, and snippets \u2014 at most the top 3 per call, so cover each distinct topic with its own call. Pass recency ("day"|"week"|"month"|"year") to restrict to a recent period. ' + STANDALONE_QUERY_TOOL_CLAUSE,
1429
1384
  inputSchema: serperNewsSearchSchema,
1430
1385
  execute: async ({ query, count: reqCount, recency, lang }) => {
1431
1386
  const cfg = deps.getLiveConfig().serper;
@@ -1433,7 +1388,12 @@ function createSerperNewsSearch(deps) {
1433
1388
  return { results: [], error: "Serper.dev news is not enabled" };
1434
1389
  }
1435
1390
  deps.logger.log(`Serper.dev News search for "${query}"`);
1436
- const num = Math.min(reqCount ?? cfg.news.results, cfg.news.results);
1391
+ const num = Math.min(reqCount ?? cfg.news.results, cfg.news.results, SEARCH_API_RESULTS_CAP);
1392
+ if (num < (reqCount ?? cfg.news.results)) {
1393
+ deps.logger.warn(
1394
+ `Serper.dev news results clamped to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff) for "${query}"`
1395
+ );
1396
+ }
1437
1397
  const newsBody = {
1438
1398
  q: query,
1439
1399
  num
@@ -1452,7 +1412,13 @@ function createSerperNewsSearch(deps) {
1452
1412
  if (!res.ok) return { results: [] };
1453
1413
  const data = await res.json();
1454
1414
  if (!data.news?.length) return { results: [] };
1455
- const results = data.news.map(mapSerperNewsResult);
1415
+ const mapped = data.news.map(mapSerperNewsResult);
1416
+ const results = mapped.filter((r) => !isGoogleGotoLink(r.url));
1417
+ if (results.length < mapped.length) {
1418
+ deps.logger.warn(
1419
+ `Serper.dev dropped ${mapped.length - results.length} unresolved google.com/goto link(s) for "${query}"`
1420
+ );
1421
+ }
1456
1422
  return { results };
1457
1423
  }
1458
1424
  });
@@ -1492,7 +1458,12 @@ function createSerperPlacesSearch(deps) {
1492
1458
  return { results: [], error: "Serper.dev places is not enabled" };
1493
1459
  }
1494
1460
  deps.logger.log(`Serper.dev Places search for "${query}"`);
1495
- const num = Math.min(reqCount ?? cfg.places.results, cfg.places.results);
1461
+ const num = Math.min(reqCount ?? cfg.places.results, cfg.places.results, SEARCH_API_RESULTS_CAP);
1462
+ if (num < (reqCount ?? cfg.places.results)) {
1463
+ deps.logger.warn(
1464
+ `Serper.dev places results clamped to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff) for "${query}"`
1465
+ );
1466
+ }
1496
1467
  const body = { q: query, num };
1497
1468
  applyLocaleParams(body, lang ?? deps.defaultLang);
1498
1469
  const res = await fetchWithTimeout(
@@ -1553,7 +1524,12 @@ function createSerperShoppingSearch(deps) {
1553
1524
  };
1554
1525
  }
1555
1526
  deps.logger.log(`Serper.dev Shopping search for "${query}"`);
1556
- const num = Math.min(reqCount ?? cfg.shopping.results, cfg.shopping.results);
1527
+ const num = Math.min(reqCount ?? cfg.shopping.results, cfg.shopping.results, SEARCH_API_RESULTS_CAP);
1528
+ if (num < (reqCount ?? cfg.shopping.results)) {
1529
+ deps.logger.warn(
1530
+ `Serper.dev shopping results clamped to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff) for "${query}"`
1531
+ );
1532
+ }
1557
1533
  const body = { q: query, num };
1558
1534
  const effectiveLang = lang ?? deps.defaultLang;
1559
1535
  applyLocaleParams(body, effectiveLang);
@@ -1689,7 +1665,7 @@ function mapSerperWebResult(r) {
1689
1665
  // src/tools/serper/web-search.tool.ts
1690
1666
  function createSerperWebSearch(deps) {
1691
1667
  return tool({
1692
- description: 'Search the web using Serper.dev (Google results). Returns organic results with titles, snippets, and links. Pass recency ("day"|"week"|"month"|"year") to restrict to fresh results. ' + STANDALONE_QUERY_TOOL_CLAUSE,
1668
+ description: 'Search the web using Serper.dev (Google results). Returns organic results with titles, snippets, and links \u2014 at most the top 3 per call, so cover each distinct topic or entity with its own call. Pass recency ("day"|"week"|"month"|"year") to restrict to fresh results. ' + STANDALONE_QUERY_TOOL_CLAUSE,
1693
1669
  inputSchema: serperWebSearchSchema,
1694
1670
  execute: async ({ query, recency, lang }) => {
1695
1671
  const cfg = deps.getLiveConfig().serper;
@@ -1697,9 +1673,15 @@ function createSerperWebSearch(deps) {
1697
1673
  return { results: [], error: "Serper.dev web search is not enabled" };
1698
1674
  }
1699
1675
  deps.logger.log(`Serper.dev search for "${query}"`);
1676
+ const num = Math.min(cfg.web.results, SEARCH_API_RESULTS_CAP);
1677
+ if (num < cfg.web.results) {
1678
+ deps.logger.warn(
1679
+ `Serper.dev web results clamped from ${cfg.web.results} to ${SEARCH_API_RESULTS_CAP} (top-3 rank cutoff)`
1680
+ );
1681
+ }
1700
1682
  const body = {
1701
1683
  q: query,
1702
- num: cfg.web.results
1684
+ num
1703
1685
  };
1704
1686
  applyLocaleParams(body, lang ?? deps.defaultLang);
1705
1687
  applyRecencyParam(body, recency);
@@ -1721,7 +1703,13 @@ function createSerperWebSearch(deps) {
1721
1703
  deps.logger.warn(`Serper.dev returned 0 results for "${query}"`);
1722
1704
  return { results: [] };
1723
1705
  }
1724
- const results = data.organic.map(mapSerperWebResult);
1706
+ const mapped = data.organic.map(mapSerperWebResult);
1707
+ const results = mapped.filter((r) => !isGoogleGotoLink(r.url));
1708
+ if (results.length < mapped.length) {
1709
+ deps.logger.warn(
1710
+ `Serper.dev dropped ${mapped.length - results.length} unresolved google.com/goto link(s) for "${query}"`
1711
+ );
1712
+ }
1725
1713
  deps.logger.log(`Serper.dev returned ${results.length} results for "${query}"`);
1726
1714
  return { results };
1727
1715
  }
@@ -1780,7 +1768,7 @@ var webFetchSchema = z.object({
1780
1768
  });
1781
1769
  function createWebFetchTool() {
1782
1770
  return tool({
1783
- description: "Fetch the full content of a specific URL (e.g. a search result page). Returns the main article text as Markdown (boilerplate removed). Prefer fetching the most relevant search results to ground the answer in full source text.",
1771
+ description: "Fetch the full content of a specific URL (e.g. a search result page). Returns the main article text as Markdown (boilerplate removed). The top 3 search results are already fetched automatically when no fetch tool runs \u2014 use this for a specific page beyond those, when the snippets are insufficient.",
1784
1772
  inputSchema: webFetchSchema,
1785
1773
  execute: async ({ url }) => {
1786
1774
  const response = await fetchWithTimeout(
@@ -1943,4 +1931,4 @@ function createYoutubeVideoSearch(deps) {
1943
1931
  });
1944
1932
  }
1945
1933
 
1946
- export { BRIGHT_DATA_TIMEOUT_MS, HEADERS, MIN_IMAGE_HEIGHT, MIN_IMAGE_WIDTH, RECENCY_DESCRIPTION, SEARCH_RETRIES, SEARCH_TIMEOUT_MS, SOURCE, STANDALONE_QUERY_DESCRIPTION, STANDALONE_QUERY_TOOL_CLAUSE, 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 };
1934
+ export { BRIGHT_DATA_TIMEOUT_MS, HEADERS, MIN_IMAGE_HEIGHT, MIN_IMAGE_WIDTH, RECENCY_DESCRIPTION, SEARCH_RETRIES, SEARCH_TIMEOUT_MS, SOURCE, STANDALONE_QUERY_DESCRIPTION, STANDALONE_QUERY_TOOL_CLAUSE, applyLocaleParams, applyRecencyParam, brightDataImageSearchSchema, brightDataNewsSearchSchema, brightDataPlacesSearchSchema, brightDataShoppingSearchSchema, brightDataVideoSearchSchema, brightDataWebSearchSchema, brightDataWebpageScrapeSchema, buildGoogleUrl, buildYoutubeThumbnailUrl, createBrightDataImageSearch, createBrightDataNewsSearch, createBrightDataPlacesSearch, createBrightDataShoppingSearch, createBrightDataVideoSearch, createBrightDataWebSearch, createBrightDataWebpageScrape, createEncyclopediaReadTool, createEncyclopediaSearchTool, createMemoryCognitionDeleteTool, createMemoryCognitionForgetTool, createMemoryPartitionDeleteTool, createMemoryPartitionRecallTool, createMemoryTaxonomyProbeTool, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionDeleteSchema, memoryCognitionForgetSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryTaxonomyProbeSchema, pickMerchantResult, requestBrightData, resolveSerperShopOfferLinks, serperBusinessReviewsSearchSchema, serperImageSearchSchema, serperNewsSearchSchema, serperPlacesSearchSchema, serperShoppingSearchSchema, serperVideoSearchSchema, serperWebSearchSchema, serperWebpageScrapeSchema, storeHostToken, summarizeContent, summarizeFound, summarizeResults, tbsSizeLabelForPixels, variantRequestSchema, webFetchSchema, withSummary, youtubeVideoSearchSchema };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@triplef/agent",
3
3
  "description": "tripleF (3F) agent domain — structured-output schemas, prompt builders, and model tools shared across the apps.",
4
- "version": "1.0.6",
5
- "packageManager": "pnpm@12.16.1",
4
+ "version": "1.0.8",
5
+ "packageManager": "pnpm@12.17.0",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "exports": {
@@ -55,12 +55,12 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@mozilla/readability": "^0.6.0",
58
- "@triplef/helpers": "^1.6.1",
59
- "linkedom": "^0.18.14",
60
- "turndown": "^7.2.4"
58
+ "@triplef/helpers": "^1.6.3",
59
+ "linkedom": "^0.18.15",
60
+ "turndown": "^7.2.5"
61
61
  },
62
62
  "peerDependencies": {
63
- "ai": "^7.0.157",
63
+ "ai": "^7.0.162",
64
64
  "zod": "^4.6.7"
65
65
  },
66
66
  "peerDependenciesMeta": {
@@ -74,25 +74,25 @@
74
74
  "@types/eslint": "^9.6.1",
75
75
  "@types/node": "^26.6.6",
76
76
  "@types/turndown": "^5.0.6",
77
- "@vitest/coverage-v8": "5.0.5",
77
+ "@vitest/coverage-v8": "5.1.0",
78
78
  "depcheck": "^1.4.7",
79
- "dependency-cruiser": "^18.7.0",
80
- "eslint": "^10.13.0",
79
+ "dependency-cruiser": "^18.7.2",
80
+ "eslint": "^10.14.0",
81
81
  "eslint-config-prettier": "^10.1.8",
82
82
  "eslint-plugin-prettier": "^5.5.7",
83
83
  "eslint-plugin-simple-import-sort": "^14.0.0",
84
84
  "eslint-plugin-sonarjs": "^4.2.2",
85
- "globals": "^17.13.0",
85
+ "globals": "^17.14.0",
86
86
  "husky": "^9.1.7",
87
87
  "jiti": "^2.7.0",
88
88
  "lint-staged": "^17.6.0",
89
89
  "npm-check-updates": "^23.1.1",
90
90
  "prettier": "^3.9.10",
91
- "rimraf": "^6.1.3",
91
+ "rimraf": "^6.1.4",
92
92
  "ts-unused-exports": "^11.0.1",
93
93
  "tsup": "^8.5.1",
94
94
  "typescript": "^5.9.3",
95
95
  "typescript-eslint": "^8.72.1",
96
- "vitest": "^5.0.5"
96
+ "vitest": "^5.1.0"
97
97
  }
98
98
  }