@triplef/agent 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{format-zod-shape.helper-BviIexpu.d.ts → format-zod-shape.helper-BQtOJfG6.d.ts} +1 -1
- package/dist/prompts/index.d.ts +6 -4
- package/dist/prompts/index.mjs +49 -26
- package/dist/schemas/index.d.ts +8 -2
- package/dist/schemas/index.mjs +42 -3
- package/dist/tools/index.d.ts +24 -3
- package/dist/tools/index.mjs +47 -6
- package/package.json +2 -2
package/dist/{format-zod-shape.helper-BviIexpu.d.ts → format-zod-shape.helper-BQtOJfG6.d.ts}
RENAMED
|
@@ -4,7 +4,7 @@ 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-forget"];
|
|
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"];
|
|
8
8
|
declare const ENCYCLOPEDIA_TOOL_NAMES: readonly ["encyclopedia-search", "encyclopedia-read"];
|
|
9
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"];
|
|
10
10
|
type ToolName = (typeof TOOL_NAMES)[number];
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.helper-
|
|
2
|
-
export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.helper-
|
|
1
|
+
import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.helper-BQtOJfG6.js';
|
|
2
|
+
export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.helper-BQtOJfG6.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';
|
|
@@ -29,6 +29,8 @@ type ContentSystemPromptParams = {
|
|
|
29
29
|
|
|
30
30
|
declare function buildContentSystemPrompt(params: ContentSystemPromptParams): string;
|
|
31
31
|
|
|
32
|
+
declare function buildDescribePdfPagePrompt(documentName: string, pageNumber: number, pageCount: number): string;
|
|
33
|
+
|
|
32
34
|
declare function buildExecuteLanguageInstruction(language?: string, options?: {
|
|
33
35
|
queryLanguageName?: boolean;
|
|
34
36
|
}): string;
|
|
@@ -197,7 +199,7 @@ declare function buildMemoryProfilePrompt(params: {
|
|
|
197
199
|
maxPayloadChars?: number;
|
|
198
200
|
}): string;
|
|
199
201
|
|
|
200
|
-
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
|
|
202
|
+
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- category is the broad family the fact belongs to (partition lane only): ONE lowercase PLURAL family noun per remember call \u2014 stocks, games, pets, work, health, finance, contacts \u2026 \u2014 chosen so narrow topics group into families. A category is NEVER a specific entity, product, company, or game title: \"amd\" is a tag under the category \"stocks\"; \"stellar blade\" and \"stellar blade blood rain\" are tags under the category \"games\". Always include it; tags stay narrow, category stays broad and plural.\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.";
|
|
201
203
|
declare function buildMemoryWritePrompt(params: {
|
|
202
204
|
userRequest: string;
|
|
203
205
|
priorMemory?: string;
|
|
@@ -391,4 +393,4 @@ declare const verdictSpineSnippet: TemplateSnippet;
|
|
|
391
393
|
|
|
392
394
|
declare const videoGallerySnippet: TemplateSnippet;
|
|
393
395
|
|
|
394
|
-
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, type ContentSystemPromptParams, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, 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, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, type TemplateSnippet, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildEncyclopediaClassifyPrompt, 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, 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 };
|
|
396
|
+
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, type ContentSystemPromptParams, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, 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, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, type TemplateSnippet, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildDescribePdfPagePrompt, buildEncyclopediaClassifyPrompt, 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, 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 };
|
package/dist/prompts/index.mjs
CHANGED
|
@@ -1112,6 +1112,23 @@ ${params.instructions}`);
|
|
|
1112
1112
|
return sections.filter(Boolean).join("\n\n");
|
|
1113
1113
|
}
|
|
1114
1114
|
|
|
1115
|
+
// src/prompts/harness/describe-pdf-page.prompt.ts
|
|
1116
|
+
function buildDescribePdfPagePrompt(documentName, pageNumber, pageCount) {
|
|
1117
|
+
return [
|
|
1118
|
+
`You are looking at page ${pageNumber} of ${pageCount} of the PDF document "${documentName}" (attached as an image).`,
|
|
1119
|
+
``,
|
|
1120
|
+
`Describe this page so it can be stored permanently in a document knowledge base:`,
|
|
1121
|
+
`1. Layout: how the page is structured (header, sections, columns, tables, lists, figures, images, footer).`,
|
|
1122
|
+
`2. Transcription: ALL text visible on the page, verbatim, in reading order. Do not summarize, abridge, paraphrase, or skip anything \u2014 including headings, footnotes, captions, table cells, and code blocks.`,
|
|
1123
|
+
`3. Figures and images: one brief factual sentence each (what it depicts, labels, axis titles, legend).`,
|
|
1124
|
+
``,
|
|
1125
|
+
`Rules:`,
|
|
1126
|
+
`- Describe only what is actually on the page. Never invent content, and never reference other pages or assume context from them.`,
|
|
1127
|
+
`- Write plain prose. No commentary about your task, no markdown fences, no JSON.`,
|
|
1128
|
+
`- When the page carries no readable content (blank or pure decoration), answer exactly: "This page contains no readable content."`
|
|
1129
|
+
].join("\n");
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1115
1132
|
// src/tools/helpers/localized-query-suffix.helper.ts
|
|
1116
1133
|
function localizedQuerySuffix(lang) {
|
|
1117
1134
|
if (!lang) return "";
|
|
@@ -1313,10 +1330,11 @@ var TOOL_DESCRIPTIONS = {
|
|
|
1313
1330
|
requestDenoised: "Request a denoised (blurred) version of the images. Use when the original has noise, grain, or artifacts that hide details.",
|
|
1314
1331
|
requestSharpened: "Request a sharpened version of the images. Use when edges or fine details are blurry.",
|
|
1315
1332
|
requestClahe: "Request a CLAHE (contrast-enhanced) version of the images. Use when details are hidden in shadows or highlights.",
|
|
1316
|
-
"memory-partition-remember": `Store into the user's fact partition (memory-partition): notable facts about subjects they care about (
|
|
1333
|
+
"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.`,
|
|
1317
1334
|
"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.",
|
|
1318
1335
|
"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.",
|
|
1319
|
-
"memory-cognition-remember": "Store one
|
|
1336
|
+
"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.",
|
|
1337
|
+
"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.',
|
|
1320
1338
|
"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."
|
|
1321
1339
|
};
|
|
1322
1340
|
var BROWSER_TOOL_NAMES = [
|
|
@@ -2383,18 +2401,20 @@ var MEMORY_RULES = `MEMORY RULES (ABSOLUTE \u2014 when memory tools are enabled)
|
|
|
2383
2401
|
Memory is an active growth loop, not a passive store: the model gathers knowledge about the
|
|
2384
2402
|
user's subjects, notices their preferences, and enriches the store on every relevant turn \u2014
|
|
2385
2403
|
without needing an explicit "remember" instruction. Two lanes, never confused:
|
|
2386
|
-
- memory-partition = the
|
|
2387
|
-
- memory-cognition =
|
|
2388
|
-
- 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
|
|
2404
|
+
- 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.
|
|
2405
|
+
- 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.
|
|
2406
|
+
- 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.
|
|
2389
2407
|
- 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.
|
|
2390
|
-
-
|
|
2408
|
+
- 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.
|
|
2409
|
+
- 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.
|
|
2391
2410
|
- 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.
|
|
2392
|
-
- EXPLICIT INSTRUCTION: when the user explicitly asks to remember, track, follow, or learn something (however phrased, in any language),
|
|
2411
|
+
- 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.
|
|
2393
2412
|
- 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.
|
|
2394
2413
|
- 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).
|
|
2395
|
-
- FORGET
|
|
2414
|
+
- 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.
|
|
2415
|
+
- 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.
|
|
2396
2416
|
- DISCLOSE: when the user asks what you remember, know, or have learned about them ("what do you know about me?", however phrased, any language), answer from memory and your cognition (the structured profile block and any probed insights already in context) \u2014 template "text", prompt variant "familiarity", NO web tools (the subject is private, not public). Disclose plainly, quote the stored statements and profile fields, and offer correction or deletion.
|
|
2397
|
-
- When a request needs both memory and public sources, include memory-partition-recall AND the enabled *WebSearch tools \u2014 never replace memory-partition-recall with web search. Memory is the user's
|
|
2417
|
+
- When a request needs both memory and public sources, include memory-partition-recall AND the enabled *WebSearch tools \u2014 never replace memory-partition-recall with web search. Memory is the user's stored records; web is public sources; the answer keeps the two distinct.
|
|
2398
2418
|
- A READ question about prior conversation is a CONTINUATION: carry the referenced entities into contextSummary verbatim so the recall query stays concrete.`;
|
|
2399
2419
|
var MEMORY_AWARE_CLARIFICATION_RULES = `MEMORY-AWARE CLARIFICATION (when a MEMORY PROBE block is present)
|
|
2400
2420
|
- The MEMORY PROBE block holds YOUR long-term memory of this user \u2014 trusted
|
|
@@ -3288,9 +3308,9 @@ var memoryProfileResponseSchema = z.preprocess(
|
|
|
3288
3308
|
var MEMORY_PROFILE_INSTRUCTIONS = buildStructuredPrompt(memoryProfileResponseSchema, {
|
|
3289
3309
|
before: `COGNITION JOB \u2014 maintain YOUR evolving understanding of THIS user.
|
|
3290
3310
|
|
|
3291
|
-
You hold three kinds of cognition, all
|
|
3311
|
+
You hold three kinds of cognition, all SUBJECTIVE (never the objective fact store):
|
|
3292
3312
|
1. PROFILE \u2014 a single structured JSON document: who the user is (stable identity and durable LEAN topics) PLUS your own persona (the name, role, and voice the user has given YOU) and your learned corrections (behavioral rules the user taught you after you got something wrong) and your CONVICTIONS (short topics of durable conclusions you synthesized about the user's world \u2014 the routing-map side of your conviction records, whose depth lives at paths "convictions.<slug>"). You output a PATCH, never the whole document \u2014 your fields are MERGED into the stored profile in code: fields you OMIT are kept as stored, fields you set REPLACE the stored value, and a field set to null REMOVES it from the profile ("likes": null deletes the whole list). Never repeat unchanged fields, and never null a field you merely do not know \u2014 null deletes. The user-side profile is a ROUTING MAP: its values are short topic strings ("cars", "Linux", "TypeScript") that double as probe triggers into your deeper insight memory \u2014 keep each value to a phrase, never a sentence; depth does not belong here. The persona and corrections are about YOU, not the user \u2014 never confuse the two. Convictions sit between: they are YOUR synthesized conclusions about the user's world, recorded as short topics.
|
|
3293
|
-
2. INSIGHTS \u2014 the DEPTH behind those topics: specific models they like, past statements, working nuances \u2014 recalled later by vector probe when that topic comes up. One self-contained sentence each, third person, lead with the topic. When an insight deepens a stored profile value, attach its "path" as "field.keyword" where the keyword names THAT value exactly \u2014 short, never a phrase (profile likes "anime" \u2192 "likes.anime"); genuinely general insights stay pathless.
|
|
3313
|
+
2. INSIGHTS \u2014 the DEPTH behind those topics: stated preferences, specific models they like, past statements, working nuances \u2014 recalled later by vector probe when that topic comes up. One self-contained sentence each, third person, lead with the topic. When an insight deepens a stored profile value, attach its "path" as "field.keyword" where the keyword names THAT value exactly \u2014 short, never a phrase (profile likes "anime" \u2192 "likes.anime"); genuinely general insights stay pathless.
|
|
3294
3314
|
3. EPISODE \u2014 a single sentence recording what THIS turn was about (the interaction arc: what the user asked, what you did, what was decided or left open). Short-term conversation memory, recalled later by a recency-blended probe when a new turn touches the same topic or the user asks about recent activity. One sentence, past tense, lead with the action ("Helped the user debug the memory app's probe"). Omit when the turn was trivial (greetings, one-word answers, no substance) or when the turn is about memory itself: a recap request ("where did we leave off?", "do you remember what we did?", "what have we been working on?") and its answer only REPEAT earlier turns \u2014 they add no activity of their own, and echoing them as an episode would crowd out the real recent activity the next time the user asks. Exception: when the user CORRECTS your recap ("no, we were listening to music"), record the correction's substance \u2014 what the recent activity actually was \u2014 never the mistaken recap.
|
|
3295
3315
|
|
|
3296
3316
|
You receive:
|
|
@@ -3303,7 +3323,7 @@ You receive:
|
|
|
3303
3323
|
|
|
3304
3324
|
Rules:
|
|
3305
3325
|
- Evidence only: record ONLY what this payload supports \u2014 USER REQUEST, ASSISTANT RESPONSE, CURRENT PROFILE, DERIVED INSIGHTS. Never guess or invent attributes (name, language, timezone, expertise, likes, interests, goals \u2026) the turn did not state or clearly imply; a value you do not know is an OMISSION, never a null and never a guess.
|
|
3306
|
-
-
|
|
3326
|
+
- Exclusive home of the subjective: THIS cognition tier is the ONLY store for user profile data \u2014 stated preferences and interests ("the user likes\u2026", "the user is interested in\u2026") as well as derived durable characteristics, goals, expertise, communication style. When the user STATES a preference or interest, record it here (a short profile topic, plus an insight when there is depth) \u2014 never skip it as "a fact for the memory records": the objective fact partition is barred from carrying preferences, so a preference you do not record is lost. Never one-off moods, task content, or objective facts (contacts, project details, events) \u2014 objective records belong to the memory partition, never to this profile.
|
|
3307
3327
|
- Persona is about YOU: when the user names you, assigns you a role, or describes how you should behave or speak, record it under "persona" (name, role, personality, greeting, voice). Evidence only \u2014 never invent a name or role the user did not give, and never copy the user's own attributes into persona. Persona values are short strings too (name "Sam", role "coding assistant"), never sentences.
|
|
3308
3328
|
- Corrections are lessons: when the user corrects you ("don't do X", "always do Y", "that's wrong \u2014 do Z instead"), record it under "corrections" as a short imperative directive keyed by a lowercase dash-joined slug ("lint-before-commit": "always run lint before committing"). The key is a stable handle for later update/remove \u2014 the value is what matters. Evidence only \u2014 never invent a correction the user did not make. To revise a correction, re-emit its key with the new value; to remove one, set its value to null.
|
|
3309
3329
|
- Episode is the turn's arc, not a fact: one sentence on what this turn was about (asked / did / decided / left open). Omit for trivial turns and for turns that only recap past activity; a corrected recap stores the correction's substance, never the recap itself. Never store secrets or sensitive data in the episode.
|
|
@@ -3362,8 +3382,8 @@ var MEMORY_PROFILE_VERDICT = "Decide: output the JSON object now \u2014 the prof
|
|
|
3362
3382
|
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.
|
|
3363
3383
|
|
|
3364
3384
|
Two lanes, never confused:
|
|
3365
|
-
- memory-partition = the
|
|
3366
|
-
- memory-cognition =
|
|
3385
|
+
- 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.
|
|
3386
|
+
- 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.
|
|
3367
3387
|
|
|
3368
3388
|
You receive:
|
|
3369
3389
|
- USER REQUEST: what the user asked.
|
|
@@ -3371,14 +3391,16 @@ You receive:
|
|
|
3371
3391
|
- PROBED THIS TURN: what memory-partition-recall already surfaced for this turn (may be empty) \u2014 already known, never re-store.
|
|
3372
3392
|
- GATHERED DATA: summarized tool results from this turn (web searches, lookups).
|
|
3373
3393
|
|
|
3374
|
-
Store into the PARTITION lane (call memory-partition-remember) only when it is durable and user-specific:
|
|
3375
|
-
- A
|
|
3376
|
-
- A notable fact the user asks you to track or remember.
|
|
3394
|
+
Store into the PARTITION lane (call memory-partition-remember) only when it is durable, objective, and user-specific:
|
|
3395
|
+
- 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).
|
|
3377
3396
|
- Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.
|
|
3378
3397
|
|
|
3379
|
-
|
|
3398
|
+
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.
|
|
3399
|
+
|
|
3400
|
+
Store into the COGNITION lane (call memory-cognition-remember) whenever the turn yields SUBJECTIVE user data, stated or derived:
|
|
3401
|
+
- 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.
|
|
3380
3402
|
- An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.
|
|
3381
|
-
- Never
|
|
3403
|
+
- Never an objective fact \u2014 those belong in the partition lane.
|
|
3382
3404
|
|
|
3383
3405
|
STORAGE MECHANICS \u2014 how your memory works (write for the retriever):
|
|
3384
3406
|
- 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").
|
|
@@ -3407,7 +3429,7 @@ function buildMemoryWritePrompt(params) {
|
|
|
3407
3429
|
MEMORY_WRITE_VERDICT
|
|
3408
3430
|
].filter(Boolean).join("\n\n");
|
|
3409
3431
|
}
|
|
3410
|
-
var MEMORY_WRITE_VERDICT = 'Decide: store each durable
|
|
3432
|
+
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.';
|
|
3411
3433
|
var ResearchFrictionQueryDecisionSchema = z.object({
|
|
3412
3434
|
/** The friction id — echoed back so the worker maps the verdict to its candidate. */
|
|
3413
3435
|
id: z.string(),
|
|
@@ -3570,18 +3592,19 @@ function buildExtractionPrompt(knownCategories = [], knownTags = []) {
|
|
|
3570
3592
|
before: "OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:",
|
|
3571
3593
|
after: `
|
|
3572
3594
|
YOUR TASK \u2014 decide what is worth remembering:
|
|
3573
|
-
-
|
|
3574
|
-
-
|
|
3595
|
+
- 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.
|
|
3596
|
+
- 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").
|
|
3597
|
+
- 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".
|
|
3575
3598
|
- Facts must be self-contained \u2014 no "this"/"that" references; write them as third-person statements.
|
|
3576
|
-
- 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 ("
|
|
3577
|
-
- 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.
|
|
3599
|
+
- 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").
|
|
3600
|
+
- 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.
|
|
3578
3601
|
|
|
3579
3602
|
FACT METADATA \u2014 every fact object carries the fields the maintenance passes (consolidate/reflect/conviction) interpret:
|
|
3580
3603
|
- text: the statement itself.
|
|
3581
3604
|
- subject (optional): the lowercase entity the fact is about \u2014 "user" by default, or a person, product, or project name ("sam", "stellar blade", "payments service"). Maintenance only ever compares facts about the SAME subject, so name it whenever the fact is about a specific entity.
|
|
3582
3605
|
- category (optional): ONE broad lowercase PLURAL family label for this fact, reusing the known vocabulary \u2014 inherits the turn-side category when omitted.
|
|
3583
3606
|
- kind (required): what kind of durable thing it is:
|
|
3584
|
-
- preference \u2014 likes, dislikes, wants,
|
|
3607
|
+
- preference \u2014 RESERVED, never emit: likes, dislikes, wants, and interests are subjective user data owned by the cognition tier (see ROUTING BOUNDARY)
|
|
3585
3608
|
- decision \u2014 a choice that was made (adoptions, migrations, purchases committed to)
|
|
3586
3609
|
- state \u2014 the CURRENT, changeable situation (lives in X, uses version Y, runs Z) \u2014 newer statements supersede these
|
|
3587
3610
|
- contact \u2014 contact details of a person (phone, email, address)
|
|
@@ -3649,4 +3672,4 @@ Compose the response from the snippets below. Include every snippet you can subs
|
|
|
3649
3672
|
${parts.join("\n\n")}`;
|
|
3650
3673
|
}
|
|
3651
3674
|
|
|
3652
|
-
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, DEFAULT_VARIANT_ID, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_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, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildEncyclopediaClassifyPrompt, 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, 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 };
|
|
3675
|
+
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, DEFAULT_VARIANT_ID, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_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, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildDescribePdfPagePrompt, buildEncyclopediaClassifyPrompt, 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, 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 };
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export { E as EncyclopediaDocumentInput, a as EncyclopediaDocumentResult, b as EncyclopediaSearchHit, c as EncyclopediaSearchInput } from '../encyclopedia-search.model-oFW8_rUT.js';
|
|
3
|
-
export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, E as ENCYCLOPEDIA_TOOL_NAMES, F as FormatZodShapeOptions, a as IMAGE_TASK_TEMPLATES, b as ImageTaskTemplate, I as IntentResult, c as IntentSchema, M as MEMORY_TOOL_NAMES, P as ProviderConfig, d as TOOL_DESCRIPTIONS, e as TOOL_NAMES, T as TemplateName, f as ToolName, g as VARIANT_NAMES, V as VariantName, h as formatZodShape, i as isImageTaskTemplate } from '../format-zod-shape.helper-
|
|
3
|
+
export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, E as ENCYCLOPEDIA_TOOL_NAMES, F as FormatZodShapeOptions, a as IMAGE_TASK_TEMPLATES, b as ImageTaskTemplate, I as IntentResult, c as IntentSchema, M as MEMORY_TOOL_NAMES, P as ProviderConfig, d as TOOL_DESCRIPTIONS, e as TOOL_NAMES, T as TemplateName, f as ToolName, g as VARIANT_NAMES, V as VariantName, h as formatZodShape, i as isImageTaskTemplate } from '../format-zod-shape.helper-BQtOJfG6.js';
|
|
4
4
|
|
|
5
5
|
declare const BLOCKED_IMAGE_HOSTS: Set<string>;
|
|
6
6
|
|
|
@@ -272,6 +272,12 @@ interface MergedCognitionProfile {
|
|
|
272
272
|
}
|
|
273
273
|
declare function mergeCognitionProfiles(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): MergedCognitionProfile;
|
|
274
274
|
|
|
275
|
+
interface PruneProfileTopicOutcome {
|
|
276
|
+
profile: MemoryCognitionProfile;
|
|
277
|
+
removed?: string;
|
|
278
|
+
}
|
|
279
|
+
declare function pruneProfileTopic(profile: MemoryCognitionProfile, path: string): PruneProfileTopicOutcome;
|
|
280
|
+
|
|
275
281
|
declare const ResearchFrictionQueryDecisionSchema: z.ZodObject<{
|
|
276
282
|
id: z.ZodString;
|
|
277
283
|
checkable: z.ZodBoolean;
|
|
@@ -910,4 +916,4 @@ declare const videolistSchema: z.ZodObject<{
|
|
|
910
916
|
}, z.core.$strip>>>;
|
|
911
917
|
}, z.core.$strip>;
|
|
912
918
|
|
|
913
|
-
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, type ConsolidationVerdict, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, type EncyclopediaClassification, EncyclopediaClassifySchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, MORE_MEDIA_COUNT, type MemoryClusterSummary, MemoryClusterSummarySchema, type MemoryCognitionProfile, type MemoryEnrichment, MemoryEnrichmentSchema, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, type MergedCognitionProfile, NON_PAGE_EXTENSIONS, type ResearchFrictionQuery, type ResearchFrictionQueryDecision, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, type ResearchTriage, type ResearchTriageDecision, ResearchTriageDecisionSchema, ResearchTriageSchema, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
|
919
|
+
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, type ConsolidationVerdict, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, type EncyclopediaClassification, EncyclopediaClassifySchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, MORE_MEDIA_COUNT, type MemoryClusterSummary, MemoryClusterSummarySchema, type MemoryCognitionProfile, type MemoryEnrichment, MemoryEnrichmentSchema, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, type MergedCognitionProfile, NON_PAGE_EXTENSIONS, type PruneProfileTopicOutcome, type ResearchFrictionQuery, type ResearchFrictionQueryDecision, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, type ResearchTriage, type ResearchTriageDecision, ResearchTriageDecisionSchema, ResearchTriageSchema, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -152,10 +152,11 @@ var TOOL_DESCRIPTIONS = {
|
|
|
152
152
|
requestDenoised: "Request a denoised (blurred) version of the images. Use when the original has noise, grain, or artifacts that hide details.",
|
|
153
153
|
requestSharpened: "Request a sharpened version of the images. Use when edges or fine details are blurry.",
|
|
154
154
|
requestClahe: "Request a CLAHE (contrast-enhanced) version of the images. Use when details are hidden in shadows or highlights.",
|
|
155
|
-
"memory-partition-remember": `Store into the user's fact partition (memory-partition): notable facts about subjects they care about (
|
|
155
|
+
"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.`,
|
|
156
156
|
"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.",
|
|
157
157
|
"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.",
|
|
158
|
-
"memory-cognition-remember": "Store one
|
|
158
|
+
"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.",
|
|
159
|
+
"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.',
|
|
159
160
|
"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."
|
|
160
161
|
};
|
|
161
162
|
var BROWSER_TOOL_NAMES = [
|
|
@@ -180,6 +181,7 @@ var MEMORY_TOOL_NAMES = [
|
|
|
180
181
|
"memory-partition-recall",
|
|
181
182
|
"memory-partition-delete",
|
|
182
183
|
"memory-cognition-remember",
|
|
184
|
+
"memory-cognition-delete",
|
|
183
185
|
"memory-cognition-forget"
|
|
184
186
|
];
|
|
185
187
|
var ENCYCLOPEDIA_TOOL_NAMES = ["encyclopedia-search", "encyclopedia-read"];
|
|
@@ -774,6 +776,43 @@ function mergeCognitionProfiles(current, patch) {
|
|
|
774
776
|
const changed = JSON.stringify(profile) !== JSON.stringify(before);
|
|
775
777
|
return { profile: changed ? profile : void 0, removals };
|
|
776
778
|
}
|
|
779
|
+
|
|
780
|
+
// src/schemas/memory/prune-profile-topic.helper.ts
|
|
781
|
+
var PRUNEABLE_ARRAY_FIELDS = ["expertise", "goals", "likes", "dislikes", "interests", "convictions"];
|
|
782
|
+
var PRUNEABLE_RECORD_FIELDS = ["preferences", "corrections"];
|
|
783
|
+
var isPruneableArrayField = (field) => PRUNEABLE_ARRAY_FIELDS.includes(field);
|
|
784
|
+
var isPruneableRecordField = (field) => PRUNEABLE_RECORD_FIELDS.includes(field);
|
|
785
|
+
var toProbeKey = (value) => value.trim().toLowerCase().replace(/\s+/g, "-");
|
|
786
|
+
function pruneProfileTopic(profile, path) {
|
|
787
|
+
const normalized = normalizeInsightPath(path);
|
|
788
|
+
if (!normalized) return { profile };
|
|
789
|
+
const dot = normalized.indexOf(".");
|
|
790
|
+
const field = normalized.slice(0, dot);
|
|
791
|
+
const keyword = normalized.slice(dot + 1);
|
|
792
|
+
if (isPruneableArrayField(field)) {
|
|
793
|
+
const values = profile[field];
|
|
794
|
+
const match = values?.find((value) => toProbeKey(value) === keyword);
|
|
795
|
+
if (!values || !match) return { profile };
|
|
796
|
+
const remaining = values.filter((value) => value !== match);
|
|
797
|
+
return {
|
|
798
|
+
// An emptied facet goes away entirely — the merge/store layers treat an
|
|
799
|
+
// absent key as "removed", and normalizeCognitionProfile strips noise.
|
|
800
|
+
profile: { ...profile, [field]: remaining.length > 0 ? remaining : void 0 },
|
|
801
|
+
removed: match
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
if (isPruneableRecordField(field)) {
|
|
805
|
+
const record = profile[field];
|
|
806
|
+
const key = record ? Object.keys(record).find((candidate) => toProbeKey(candidate) === keyword) : void 0;
|
|
807
|
+
if (!record || !key) return { profile };
|
|
808
|
+
const remaining = Object.fromEntries(Object.entries(record).filter(([candidate]) => candidate !== key));
|
|
809
|
+
return {
|
|
810
|
+
profile: { ...profile, [field]: Object.keys(remaining).length > 0 ? remaining : void 0 },
|
|
811
|
+
removed: key
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
return { profile };
|
|
815
|
+
}
|
|
777
816
|
var ResearchFrictionQueryDecisionSchema = z.object({
|
|
778
817
|
/** The friction id — echoed back so the worker maps the verdict to its candidate. */
|
|
779
818
|
id: z.string(),
|
|
@@ -1190,4 +1229,4 @@ var videolistSchema = z.object({
|
|
|
1190
1229
|
internationalCoverage: internationalCoverageSchema.optional()
|
|
1191
1230
|
});
|
|
1192
1231
|
|
|
1193
|
-
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, DEFAULT_VARIANT_ID, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, ENCYCLOPEDIA_TOOL_NAMES, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, EncyclopediaClassifySchema, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, IMAGE_TASK_TEMPLATES, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, MORE_MEDIA_COUNT, MemoryClusterSummarySchema, MemoryEnrichmentSchema, NON_PAGE_EXTENSIONS, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, ResearchTriageDecisionSchema, ResearchTriageSchema, TOOL_DESCRIPTIONS, TOOL_NAMES, VARIANT_NAMES, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isImageTaskTemplate, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
|
1232
|
+
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, DEFAULT_VARIANT_ID, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, ENCYCLOPEDIA_TOOL_NAMES, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, EncyclopediaClassifySchema, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, IMAGE_TASK_TEMPLATES, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, MORE_MEDIA_COUNT, MemoryClusterSummarySchema, MemoryEnrichmentSchema, NON_PAGE_EXTENSIONS, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, ResearchTriageDecisionSchema, ResearchTriageSchema, TOOL_DESCRIPTIONS, TOOL_NAMES, VARIANT_NAMES, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isImageTaskTemplate, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -362,8 +362,11 @@ declare const variantRequestSchema: z.ZodObject<{}, z.core.$strip>;
|
|
|
362
362
|
|
|
363
363
|
declare function createVariantRequestTool(variant: FilterVariant): Tool;
|
|
364
364
|
|
|
365
|
-
declare const
|
|
366
|
-
|
|
365
|
+
declare const memoryCognitionDeleteSchema: z.ZodObject<{
|
|
366
|
+
text: z.ZodOptional<z.ZodString>;
|
|
367
|
+
path: z.ZodOptional<z.ZodString>;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
type MemoryCognitionDeleteInput = z.infer<typeof memoryCognitionDeleteSchema>;
|
|
367
370
|
|
|
368
371
|
interface MemoryToolScope {
|
|
369
372
|
memoryPartition: string;
|
|
@@ -373,6 +376,24 @@ interface MemoryToolScope {
|
|
|
373
376
|
requestId?: string;
|
|
374
377
|
}
|
|
375
378
|
|
|
379
|
+
interface MemoryCognitionDeleteOutcome {
|
|
380
|
+
deleted: number;
|
|
381
|
+
texts: string[];
|
|
382
|
+
pruned: string[];
|
|
383
|
+
}
|
|
384
|
+
interface MemoryCognitionDeleteDeps {
|
|
385
|
+
scope: MemoryToolScope;
|
|
386
|
+
deleteCognitionRecords: (input: {
|
|
387
|
+
memoryCognition: string;
|
|
388
|
+
text?: string;
|
|
389
|
+
path?: string;
|
|
390
|
+
}) => Promise<MemoryCognitionDeleteOutcome>;
|
|
391
|
+
}
|
|
392
|
+
declare function createMemoryCognitionDeleteTool(deps: MemoryCognitionDeleteDeps): Tool;
|
|
393
|
+
|
|
394
|
+
declare const memoryCognitionForgetSchema: z.ZodObject<{}, z.core.$strip>;
|
|
395
|
+
type MemoryCognitionForgetInput = z.infer<typeof memoryCognitionForgetSchema>;
|
|
396
|
+
|
|
376
397
|
interface MemoryCognitionForgetDeps {
|
|
377
398
|
scope: MemoryToolScope;
|
|
378
399
|
deleteCognition: (memoryCognition: string) => Promise<string[]>;
|
|
@@ -742,4 +763,4 @@ interface VideoStats {
|
|
|
742
763
|
lang?: string;
|
|
743
764
|
}
|
|
744
765
|
|
|
745
|
-
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 MemoryCognitionForgetInput, type MemoryCognitionRememberInput, type MemoryPartitionDeleteInput, type MemoryPartitionRecallInput, type MemoryPartitionRememberInput, MemoryPoint, 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, createMemoryCognitionForgetTool, createMemoryCognitionRememberTool, createMemoryPartitionDeleteTool, createMemoryPartitionRecallTool, createMemoryPartitionRememberTool, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, defaultSummarize, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionForgetSchema, memoryCognitionRememberSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryPartitionRememberSchema, pickMerchantResult, requestBrightData, resolveSerperShopOfferLinks, serperBusinessReviewsSearchSchema, serperImageSearchSchema, serperNewsSearchSchema, serperPlacesSearchSchema, serperShoppingSearchSchema, serperVideoSearchSchema, serperWebSearchSchema, serperWebpageScrapeSchema, storeHostToken, summarizeContent, summarizeFound, summarizeResults, tbsSizeLabelForPixels, variantRequestSchema, webFetchSchema, withSummary, youtubeVideoSearchSchema };
|
|
766
|
+
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 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, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, defaultSummarize, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionDeleteSchema, memoryCognitionForgetSchema, memoryCognitionRememberSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryPartitionRememberSchema, pickMerchantResult, requestBrightData, resolveSerperShopOfferLinks, serperBusinessReviewsSearchSchema, serperImageSearchSchema, serperNewsSearchSchema, serperPlacesSearchSchema, serperShoppingSearchSchema, serperVideoSearchSchema, serperWebSearchSchema, serperWebpageScrapeSchema, storeHostToken, summarizeContent, summarizeFound, summarizeResults, tbsSizeLabelForPixels, variantRequestSchema, webFetchSchema, withSummary, youtubeVideoSearchSchema };
|
package/dist/tools/index.mjs
CHANGED
|
@@ -950,6 +950,47 @@ function createVariantRequestTool(variant) {
|
|
|
950
950
|
execute: async () => ({ variant })
|
|
951
951
|
});
|
|
952
952
|
}
|
|
953
|
+
var memoryCognitionDeleteSchema = z.object({
|
|
954
|
+
text: z.string().min(3).max(2e3).optional().describe(
|
|
955
|
+
"The exact stored insight to delete, quoted verbatim from your injected cognition context (the probed insights block). Record texts are the record identity \u2014 no ids needed. Never paraphrase."
|
|
956
|
+
),
|
|
957
|
+
path: z.string().min(3).max(200).optional().describe(
|
|
958
|
+
'One profile routing path ("field.keyword", e.g. "likes.jazz") to prune a standing topic from the structured profile document. Array facets (likes, dislikes, interests, goals, expertise, convictions) drop the matching value; record facets (preferences, corrections) drop the matching key.'
|
|
959
|
+
)
|
|
960
|
+
});
|
|
961
|
+
function createMemoryCognitionDeleteTool(deps) {
|
|
962
|
+
return tool({
|
|
963
|
+
description: 'Delete one targeted piece of your cognition space (memory-cognition): pass the verbatim insight text from your injected cognition context to delete that stored insight, and/or a profile path ("field.keyword", e.g. "likes.jazz") to prune that standing topic from your structured profile. Use when the user asks to forget a preference, an interest, or any other subjective profile datum \u2014 the per-item forget for the cognition lane. To forget EVERYTHING you know about the user instead (profile AND all insights), use memory-cognition-forget. Deletion is permanent; the result confirms exactly what was removed.',
|
|
964
|
+
inputSchema: memoryCognitionDeleteSchema,
|
|
965
|
+
execute: async ({ text, path }) => {
|
|
966
|
+
try {
|
|
967
|
+
if (!text && !path) {
|
|
968
|
+
return {
|
|
969
|
+
deleted: 0,
|
|
970
|
+
pruned: [],
|
|
971
|
+
error: "Pass text (verbatim insight) and/or path (profile topic) \u2014 a targeted delete needs at least one."
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
const outcome = await deps.deleteCognitionRecords({
|
|
975
|
+
memoryCognition: deps.scope.memoryCognition ?? deps.scope.memoryPartition,
|
|
976
|
+
text,
|
|
977
|
+
path
|
|
978
|
+
});
|
|
979
|
+
return outcome.deleted > 0 || outcome.pruned.length > 0 ? { deleted: outcome.deleted, removed: outcome.texts, pruned: outcome.pruned } : {
|
|
980
|
+
deleted: 0,
|
|
981
|
+
pruned: [],
|
|
982
|
+
message: 'No stored insight matches that exact text or path \u2014 quote the insight verbatim from your injected cognition context, or name the profile path exactly (e.g. "likes.jazz").'
|
|
983
|
+
};
|
|
984
|
+
} catch (error) {
|
|
985
|
+
return {
|
|
986
|
+
deleted: 0,
|
|
987
|
+
pruned: [],
|
|
988
|
+
error: error instanceof Error ? error.message : "cognition delete failed"
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
});
|
|
993
|
+
}
|
|
953
994
|
var memoryCognitionForgetSchema = z.object({});
|
|
954
995
|
function createMemoryCognitionForgetTool(deps) {
|
|
955
996
|
return tool({
|
|
@@ -985,7 +1026,7 @@ var memoryCognitionRememberSchema = z.object({
|
|
|
985
1026
|
});
|
|
986
1027
|
function createMemoryCognitionRememberTool(deps) {
|
|
987
1028
|
return tool({
|
|
988
|
-
description: 'Store one
|
|
1029
|
+
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.',
|
|
989
1030
|
inputSchema: memoryCognitionRememberSchema,
|
|
990
1031
|
execute: async ({ text, path }) => {
|
|
991
1032
|
try {
|
|
@@ -1043,7 +1084,7 @@ var memoryPartitionRecallSchema = z.object({
|
|
|
1043
1084
|
});
|
|
1044
1085
|
function createMemoryPartitionRecallTool(deps) {
|
|
1045
1086
|
return tool({
|
|
1046
|
-
description: `Retrieve from the user's fact partition (memory-partition) \u2014
|
|
1087
|
+
description: `Retrieve from the user's fact partition (memory-partition) \u2014 objective facts they told you in past conversations or asked you to remember (contact details, decisions, project facts, past topics). These are trusted user statements, NOT public facts. Use when the user asks whether you remember something they told you or refers back to a statement from earlier conversations; the results are also the verbatim source for memory-partition-delete. For "where did we leave off" / "what were we doing recently" questions use your injected RECENT CONVERSATIONS notes instead \u2014 this lane holds what the user told you, not the log of your recent activity. For the user's preferences or what you have LEARNED about them, look to your cognition space (the injected profile and insights) \u2014 subjective user data is never stored in this partition. Attribute what you find to the user ("you mentioned\u2026", "you asked me to remember\u2026") and prefer it over web-search results for anything personal. Retrieval is semantic and sentence-aware \u2014 ask in natural language. Optionally restrict by topic tags (e.g. ["contacts"]) or exact phrase containment.`,
|
|
1047
1088
|
inputSchema: memoryPartitionRecallSchema,
|
|
1048
1089
|
execute: async ({ query, tags, contains, topK }) => {
|
|
1049
1090
|
const hits = await deps.searchByText({
|
|
@@ -1078,7 +1119,7 @@ var memoryPartitionRememberSchema = z.object({
|
|
|
1078
1119
|
});
|
|
1079
1120
|
function createMemoryPartitionRememberTool(deps) {
|
|
1080
1121
|
return tool({
|
|
1081
|
-
description: 'Store into the user\'s fact partition (memory-partition): notable facts about subjects they care about (
|
|
1122
|
+
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 `category` is one broad family label (games, pets, work, health \u2026) that groups narrow tags into one topic family \u2014 always include both.',
|
|
1082
1123
|
inputSchema: memoryPartitionRememberSchema,
|
|
1083
1124
|
execute: async ({ text, tags, category }) => {
|
|
1084
1125
|
try {
|
|
@@ -1665,8 +1706,8 @@ var defaultSummarize = (data) => {
|
|
|
1665
1706
|
if (typeof data.content === "string") return summarizeContent(data);
|
|
1666
1707
|
return {};
|
|
1667
1708
|
};
|
|
1668
|
-
function withSummary(
|
|
1669
|
-
const t =
|
|
1709
|
+
function withSummary(tool27, summarize = defaultSummarize) {
|
|
1710
|
+
const t = tool27;
|
|
1670
1711
|
t.summarize = summarize;
|
|
1671
1712
|
return t;
|
|
1672
1713
|
}
|
|
@@ -1849,4 +1890,4 @@ function createYoutubeVideoSearch(deps) {
|
|
|
1849
1890
|
});
|
|
1850
1891
|
}
|
|
1851
1892
|
|
|
1852
|
-
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, createMemoryCognitionForgetTool, createMemoryCognitionRememberTool, createMemoryPartitionDeleteTool, createMemoryPartitionRecallTool, createMemoryPartitionRememberTool, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, defaultSummarize, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionForgetSchema, memoryCognitionRememberSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryPartitionRememberSchema, pickMerchantResult, requestBrightData, resolveSerperShopOfferLinks, serperBusinessReviewsSearchSchema, serperImageSearchSchema, serperNewsSearchSchema, serperPlacesSearchSchema, serperShoppingSearchSchema, serperVideoSearchSchema, serperWebSearchSchema, serperWebpageScrapeSchema, storeHostToken, summarizeContent, summarizeFound, summarizeResults, tbsSizeLabelForPixels, variantRequestSchema, webFetchSchema, withSummary, youtubeVideoSearchSchema };
|
|
1893
|
+
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, createSerperBusinessReviewsSearch, createSerperImageSearch, createSerperNewsSearch, createSerperPlacesSearch, createSerperShoppingSearch, createSerperVideoSearch, createSerperWebSearch, createSerperWebpageScrape, createVariantRequestTool, createWebFetchTool, createYoutubeVideoSearch, defaultSummarize, encyclopediaReadSchema, encyclopediaSearchSchema, engineEnabled, extractArticleText, fetchWithTimeout, isGoogleHostUrl, localizedQuerySuffix, meetsMinimumImageDimensions, memoryCognitionDeleteSchema, memoryCognitionForgetSchema, memoryCognitionRememberSchema, memoryPartitionDeleteSchema, memoryPartitionRecallSchema, memoryPartitionRememberSchema, 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,7 +1,7 @@
|
|
|
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": "0.1.
|
|
4
|
+
"version": "0.1.25",
|
|
5
5
|
"packageManager": "pnpm@11.25.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@vitest/coverage-v8": "4.1.11",
|
|
78
78
|
"depcheck": "^1.4.7",
|
|
79
79
|
"dependency-cruiser": "^18.2.0",
|
|
80
|
-
"eslint": "^10.
|
|
80
|
+
"eslint": "^10.10.0",
|
|
81
81
|
"eslint-config-prettier": "^10.1.8",
|
|
82
82
|
"eslint-plugin-prettier": "^5.5.6",
|
|
83
83
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|