@triplef/agent 0.1.24 → 0.1.26
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-C2PB6Sb2.d.ts → format-zod-shape.helper-BQtOJfG6.d.ts} +7 -7
- package/dist/prompts/index.d.ts +25 -10
- package/dist/prompts/index.mjs +167 -58
- package/dist/schemas/index.d.ts +25 -2
- package/dist/schemas/index.mjs +194 -14
- package/dist/tools/index.d.ts +59 -3
- package/dist/tools/index.mjs +91 -9
- package/package.json +2 -2
package/dist/{format-zod-shape.helper-C2PB6Sb2.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];
|
|
@@ -107,21 +107,21 @@ type ImageTaskTemplate = (typeof IMAGE_TASK_TEMPLATES)[number];
|
|
|
107
107
|
declare function isImageTaskTemplate(template: string): template is ImageTaskTemplate;
|
|
108
108
|
declare const IntentSchema: z.ZodObject<{
|
|
109
109
|
template: z.ZodEnum<{
|
|
110
|
+
text: "text";
|
|
111
|
+
summary: "summary";
|
|
110
112
|
article: "article";
|
|
113
|
+
evaluation: "evaluation";
|
|
114
|
+
merge: "merge";
|
|
111
115
|
news: "news";
|
|
116
|
+
stockmarketitem: "stockmarketitem";
|
|
117
|
+
stockmarketlist: "stockmarketlist";
|
|
112
118
|
describe: "describe";
|
|
113
119
|
compare: "compare";
|
|
114
120
|
ocr: "ocr";
|
|
115
|
-
summary: "summary";
|
|
116
|
-
evaluation: "evaluation";
|
|
117
121
|
product: "product";
|
|
118
122
|
shoplist: "shoplist";
|
|
119
123
|
imagelist: "imagelist";
|
|
120
124
|
videolist: "videolist";
|
|
121
|
-
stockmarketitem: "stockmarketitem";
|
|
122
|
-
stockmarketlist: "stockmarketlist";
|
|
123
|
-
merge: "merge";
|
|
124
|
-
text: "text";
|
|
125
125
|
}>;
|
|
126
126
|
prompt: z.ZodDefault<z.ZodString>;
|
|
127
127
|
tools: z.ZodArray<z.ZodEnum<{
|
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';
|
|
@@ -131,7 +131,15 @@ interface ConvictionEvidenceItem {
|
|
|
131
131
|
}
|
|
132
132
|
declare function buildConvictionSynthesisPrompt(evidence: readonly ConvictionEvidenceItem[]): string;
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
interface TaxonomyVocabulary {
|
|
135
|
+
categories?: readonly string[];
|
|
136
|
+
communities?: readonly string[];
|
|
137
|
+
hubs?: readonly string[];
|
|
138
|
+
tags?: readonly string[];
|
|
139
|
+
}
|
|
140
|
+
declare function buildVocabularySection(vocab?: TaxonomyVocabulary): string;
|
|
141
|
+
|
|
142
|
+
declare function buildEncyclopediaClassifyPrompt(vocabulary?: TaxonomyVocabulary): string;
|
|
135
143
|
|
|
136
144
|
declare function formatProvenanceLine(line: {
|
|
137
145
|
text: string;
|
|
@@ -199,14 +207,13 @@ declare function buildMemoryProfilePrompt(params: {
|
|
|
199
207
|
maxPayloadChars?: number;
|
|
200
208
|
}): string;
|
|
201
209
|
|
|
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
|
|
210
|
+
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\"); 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\". Always include category; reuse the existing labels whenever they fit.\n\nTAXONOMY PROBING (pick first, create if necessary): before naming a community or hub you are not certain exists, call memory-taxonomy-probe top-down \u2014 cluster \u2192 community \u2192 hub \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) 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.";
|
|
203
211
|
declare function buildMemoryWritePrompt(params: {
|
|
204
212
|
userRequest: string;
|
|
205
213
|
priorMemory?: string;
|
|
206
214
|
probedMemory?: string;
|
|
207
215
|
gathered?: string;
|
|
208
|
-
|
|
209
|
-
knownTags?: string[];
|
|
216
|
+
vocabulary?: TaxonomyVocabulary;
|
|
210
217
|
}): string;
|
|
211
218
|
|
|
212
219
|
declare const RESEARCH_FRICTION_QUERY_INSTRUCTIONS: string;
|
|
@@ -224,10 +231,18 @@ declare function buildResearchTriagePrompt(gaps: Array<{
|
|
|
224
231
|
snippet: string;
|
|
225
232
|
}>, maxPayloadChars?: number): string;
|
|
226
233
|
|
|
227
|
-
declare
|
|
228
|
-
declare function
|
|
234
|
+
declare const TAXONOMY_RECONCILE_INSTRUCTIONS = "TAXONOMY RECONCILIATION \u2014 one purpose: decide whether two EXISTING taxonomy labels of the same tier name the same concept and should merge into one.\n\nThe macro-taxonomy, top-down: CLUSTER (plural family, e.g. \"games\") \u2192 COMMUNITY (plural sub-family, e.g. \"survival-games\") \u2192 HUB (singular subject entity, e.g. \"project zomboid\") \u2192 plus TAG labels (narrow recall vocabulary).\n\nMerge ONLY wording variants of one concept: casing/formatting drift (\"Video Games\" / \"video-games\"), singular/plural drift inside a family tier (\"survival game\" / \"survival-games\"), abbreviation with identical expansion (\"nlp\" / \"natural-language-processing\").\nNEVER merge: two entities that merely share a word (\"apple\" the company vs \"apple\" the fruit), a parent and its child (\"games\" vs \"survival-games\"), a broad tier and a specific entity (\"games\" vs \"project zomboid\"), or two genuinely different topics that happen to look similar. When in doubt, answer DISTINCT \u2014 a missed merge is cleaned up later; a wrong merge destroys both labels' meaning forever.";
|
|
235
|
+
declare function buildTaxonomyPairPrompt(params: {
|
|
236
|
+
kind: 'cluster' | 'community' | 'hub' | 'tag';
|
|
237
|
+
labelA: string;
|
|
238
|
+
labelB: string;
|
|
239
|
+
countA: number;
|
|
240
|
+
countB: number;
|
|
241
|
+
}): string;
|
|
242
|
+
declare function buildTaxonomyReconcileSystemPrompt(): string;
|
|
229
243
|
|
|
230
|
-
declare function
|
|
244
|
+
declare function buildExtractionPrompt(vocabulary?: TaxonomyVocabulary): string;
|
|
245
|
+
declare function buildExtractionCorrectionPrompt(error: string): string;
|
|
231
246
|
|
|
232
247
|
declare const COMMONMARK_FORMAT = "MARKDOWN FORMAT (strict CommonMark):\n- Use ASCII asterisks only: *italic* and **bold**.\n- Never put spaces inside the markers: write **bold**, never ** bold **.\n- Never use fullwidth or unicode asterisk characters (\uFF0A or \u2217).\n- Separate paragraphs with a blank line; keep paragraphs short.\n- Use Markdown links for URLs: [label](https://...). Never paste bare URLs.\n- Use emphasis sparingly. Bold only the single most important term in a paragraph \u2014 never a whole sentence or a lead-in clause.\n- Prefer ## or ### headings to introduce sections instead of bolding the lead-in.\n- Use - bullets for parallel items and 1. numbers for ordered steps.";
|
|
233
248
|
|
|
@@ -393,4 +408,4 @@ declare const verdictSpineSnippet: TemplateSnippet;
|
|
|
393
408
|
|
|
394
409
|
declare const videoGallerySnippet: TemplateSnippet;
|
|
395
410
|
|
|
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 };
|
|
411
|
+
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, TAXONOMY_RECONCILE_INSTRUCTIONS, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_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, 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 };
|
package/dist/prompts/index.mjs
CHANGED
|
@@ -1330,10 +1330,11 @@ var TOOL_DESCRIPTIONS = {
|
|
|
1330
1330
|
requestDenoised: "Request a denoised (blurred) version of the images. Use when the original has noise, grain, or artifacts that hide details.",
|
|
1331
1331
|
requestSharpened: "Request a sharpened version of the images. Use when edges or fine details are blurry.",
|
|
1332
1332
|
requestClahe: "Request a CLAHE (contrast-enhanced) version of the images. Use when details are hidden in shadows or highlights.",
|
|
1333
|
-
"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.`,
|
|
1334
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.",
|
|
1335
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.",
|
|
1336
|
-
"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.',
|
|
1337
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."
|
|
1338
1339
|
};
|
|
1339
1340
|
var BROWSER_TOOL_NAMES = [
|
|
@@ -2400,18 +2401,20 @@ var MEMORY_RULES = `MEMORY RULES (ABSOLUTE \u2014 when memory tools are enabled)
|
|
|
2400
2401
|
Memory is an active growth loop, not a passive store: the model gathers knowledge about the
|
|
2401
2402
|
user's subjects, notices their preferences, and enriches the store on every relevant turn \u2014
|
|
2402
2403
|
without needing an explicit "remember" instruction. Two lanes, never confused:
|
|
2403
|
-
- memory-partition = the
|
|
2404
|
-
- memory-cognition =
|
|
2405
|
-
- 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.
|
|
2406
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.
|
|
2407
|
-
-
|
|
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.
|
|
2408
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.
|
|
2409
|
-
- 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.
|
|
2410
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.
|
|
2411
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).
|
|
2412
|
-
- 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.
|
|
2413
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.
|
|
2414
|
-
- 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.
|
|
2415
2418
|
- A READ question about prior conversation is a CONTINUATION: carry the referenced entities into contextSummary verbatim so the recall query stays concrete.`;
|
|
2416
2419
|
var MEMORY_AWARE_CLARIFICATION_RULES = `MEMORY-AWARE CLARIFICATION (when a MEMORY PROBE block is present)
|
|
2417
2420
|
- The MEMORY PROBE block holds YOUR long-term memory of this user \u2014 trusted
|
|
@@ -3015,48 +3018,84 @@ function buildConvictionSynthesisPrompt(evidence) {
|
|
|
3015
3018
|
var EncyclopediaClassifySchema = z.object({
|
|
3016
3019
|
/**
|
|
3017
3020
|
* One broad lowercase PLURAL family label for the document (e.g. `games`,
|
|
3018
|
-
* `work`, `health`) — the constellation's
|
|
3021
|
+
* `work`, `health`) — the constellation's CLUSTER tier. Never a specific
|
|
3019
3022
|
* entity, product, company, or title.
|
|
3020
3023
|
*/
|
|
3021
3024
|
category: z.string(),
|
|
3022
3025
|
/**
|
|
3023
|
-
*
|
|
3024
|
-
* `
|
|
3025
|
-
*
|
|
3026
|
+
* One lowercase PLURAL sub-family label narrowing the category (e.g.
|
|
3027
|
+
* `survival-games` under `games`) — the constellation's COMMUNITY tier, one
|
|
3028
|
+
* level below the cluster. Optional: omit when no sub-family applies. Never
|
|
3029
|
+
* a specific entity, product, company, or title.
|
|
3026
3030
|
*/
|
|
3027
|
-
|
|
3031
|
+
community: z.string().optional(),
|
|
3032
|
+
/**
|
|
3033
|
+
* The narrow SINGULAR subject entity the document is about (e.g.
|
|
3034
|
+
* `wuthering waves`, `q3 budget`) — the constellation's HUB tier. A short,
|
|
3035
|
+
* specific, reusable label, not a sentence and not a URL.
|
|
3036
|
+
*/
|
|
3037
|
+
topic: z.string(),
|
|
3038
|
+
/**
|
|
3039
|
+
* Lucide icon name for a label this classification CREATES (attached to
|
|
3040
|
+
* the deepest NEW label: topic first, then community, then category).
|
|
3041
|
+
* Only from the curated taxonomy icon set; omit when adopting existing
|
|
3042
|
+
* labels or no icon fits.
|
|
3043
|
+
*/
|
|
3044
|
+
icon: z.string().optional()
|
|
3028
3045
|
});
|
|
3029
3046
|
|
|
3030
3047
|
// src/prompts/memory/vocabulary-section.helper.ts
|
|
3031
|
-
function buildVocabularySection(
|
|
3032
|
-
|
|
3048
|
+
function buildVocabularySection(vocab = {}) {
|
|
3049
|
+
const { categories = [], communities = [], hubs = [], tags = [] } = vocab;
|
|
3050
|
+
if (categories.length === 0 && communities.length === 0 && hubs.length === 0 && tags.length === 0) {
|
|
3051
|
+
return "";
|
|
3052
|
+
}
|
|
3033
3053
|
const lines = [];
|
|
3034
|
-
if (
|
|
3054
|
+
if (categories.length > 0) {
|
|
3055
|
+
lines.push(
|
|
3056
|
+
`KNOWN CATEGORIES (cluster tier \u2014 reuse one when it fits; only mint a new plural family noun when none applies): ${categories.join(", ")}`
|
|
3057
|
+
);
|
|
3058
|
+
}
|
|
3059
|
+
if (communities.length > 0) {
|
|
3035
3060
|
lines.push(
|
|
3036
|
-
`KNOWN
|
|
3061
|
+
`KNOWN COMMUNITIES (community tier \u2014 plural sub-families under a category; reuse when they fit): ${communities.join(", ")}`
|
|
3037
3062
|
);
|
|
3038
3063
|
}
|
|
3039
|
-
if (
|
|
3040
|
-
lines.push(
|
|
3064
|
+
if (hubs.length > 0) {
|
|
3065
|
+
lines.push(
|
|
3066
|
+
`KNOWN HUBS (hub tier \u2014 singular subject entities; name them verbatim when the text is about one): ${hubs.join(", ")}`
|
|
3067
|
+
);
|
|
3068
|
+
}
|
|
3069
|
+
if (tags.length > 0) {
|
|
3070
|
+
lines.push(`KNOWN TOPICS (reuse these tag labels when they fit): ${tags.join(", ")}`);
|
|
3041
3071
|
}
|
|
3042
3072
|
return lines.join("\n");
|
|
3043
3073
|
}
|
|
3044
3074
|
|
|
3045
3075
|
// src/prompts/memory/encyclopedia-classify-prompt.constant.ts
|
|
3046
|
-
function buildEncyclopediaClassifyPrompt(
|
|
3076
|
+
function buildEncyclopediaClassifyPrompt(vocabulary = {}) {
|
|
3047
3077
|
return buildStructuredPrompt(EncyclopediaClassifySchema, {
|
|
3048
3078
|
before: "OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:",
|
|
3049
3079
|
after: `
|
|
3050
|
-
YOUR TASK \u2014 label one stored source document with its
|
|
3080
|
+
YOUR TASK \u2014 label one stored source document with its place in the macro-taxonomy:
|
|
3081
|
+
|
|
3082
|
+
TAXONOMY HIERARCHY (top-down): CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE
|
|
3083
|
+
- CLUSTER = a broad PLURAL family noun ("games", "work", "health") \u2014 the highest logical bucket.
|
|
3084
|
+
- COMMUNITY = a PLURAL sub-family under one cluster ("survival-games" under "games") \u2014 a genre or domain branch.
|
|
3085
|
+
- HUB = the SINGULAR main subject entity anchoring the document ("project zomboid", "wuthering waves") \u2014 a specific name, never pluralized.
|
|
3086
|
+
- NODE = the individual chunks of the document itself \u2014 the leaves attached to the hub (you never name these).
|
|
3087
|
+
|
|
3051
3088
|
- The document may be a fetched web page, an uploaded file, or a search-result snippet. Classify by its CONTENT, never by its source shape \u2014 a file has no domain, and that must not matter.
|
|
3052
|
-
- category: ONE broad lowercase PLURAL family noun (e.g. "games", "work", "health", "finance") that groups the topic into a family. It labels the TOPIC \u2014 never a side theme or an incidental mention on the page. Never a specific entity, product, company, or title.
|
|
3053
|
-
-
|
|
3089
|
+
- category (CLUSTER): ONE broad lowercase PLURAL family noun (e.g. "games", "work", "health", "finance") that groups the topic into a family. It labels the TOPIC \u2014 never a side theme or an incidental mention on the page. Never a specific entity, product, company, or title.
|
|
3090
|
+
- community (COMMUNITY, optional): ONE lowercase PLURAL sub-family narrowing the category (e.g. "survival-games" under "games"). Omit it when no sub-family applies; never a specific entity, product, company, or title.
|
|
3091
|
+
- topic (HUB): the document's MAIN subject entity \u2014 what the whole source is about (e.g. "wuthering waves", "q3 budget", "rust borrow checker") \u2014 SINGULAR and specific. A short, reusable label \u2014 not a sentence, not a URL, not a filename, never a domain or a site name. Never a sub-part of the main subject (a chapter, a location, one feature) and never an adjacent proper noun (a publisher, an author, a related event) \u2014 when a title-level entity exists, it is the topic.
|
|
3054
3092
|
- When the document is about a KNOWN TOPIC, output that label VERBATIM \u2014 prefer "neverness to everness" over minting a variant like "nte".
|
|
3055
|
-
|
|
3093
|
+
- TAXONOMY PROBING (pick first, create if necessary): when the memory-taxonomy-probe tool is available, probe top-down \u2014 cluster \u2192 community \u2192 hub \u2014 before answering, and ADOPT returned candidates VERBATIM (a candidate's id becomes the next probe's parentId). CREATE a new label only when no candidate fits; on creation you may pass one "icon" from the curated taxonomy icon set for the deepest NEW label.
|
|
3094
|
+
${buildVocabularySection(vocabulary)}
|
|
3056
3095
|
RULES:
|
|
3057
3096
|
- Return ONLY a single valid JSON object matching the exact schema above.
|
|
3058
3097
|
- No markdown code fences, no explanations, preamble, or postscript.
|
|
3059
|
-
- Never output undefined or null.
|
|
3098
|
+
- Never output undefined or null. "category" and "topic" are always present; "community" and "icon" are omitted when they don't apply.
|
|
3060
3099
|
|
|
3061
3100
|
FINAL REMINDER:
|
|
3062
3101
|
- Output ONLY valid JSON matching the exact schema above. No markdown code fences, no explanations, preamble, or postscript.`
|
|
@@ -3305,9 +3344,9 @@ var memoryProfileResponseSchema = z.preprocess(
|
|
|
3305
3344
|
var MEMORY_PROFILE_INSTRUCTIONS = buildStructuredPrompt(memoryProfileResponseSchema, {
|
|
3306
3345
|
before: `COGNITION JOB \u2014 maintain YOUR evolving understanding of THIS user.
|
|
3307
3346
|
|
|
3308
|
-
You hold three kinds of cognition, all
|
|
3347
|
+
You hold three kinds of cognition, all SUBJECTIVE (never the objective fact store):
|
|
3309
3348
|
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.
|
|
3310
|
-
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.
|
|
3349
|
+
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.
|
|
3311
3350
|
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.
|
|
3312
3351
|
|
|
3313
3352
|
You receive:
|
|
@@ -3320,7 +3359,7 @@ You receive:
|
|
|
3320
3359
|
|
|
3321
3360
|
Rules:
|
|
3322
3361
|
- 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.
|
|
3323
|
-
-
|
|
3362
|
+
- 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.
|
|
3324
3363
|
- 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.
|
|
3325
3364
|
- 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.
|
|
3326
3365
|
- 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.
|
|
@@ -3379,8 +3418,8 @@ var MEMORY_PROFILE_VERDICT = "Decide: output the JSON object now \u2014 the prof
|
|
|
3379
3418
|
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.
|
|
3380
3419
|
|
|
3381
3420
|
Two lanes, never confused:
|
|
3382
|
-
- memory-partition = the
|
|
3383
|
-
- memory-cognition =
|
|
3421
|
+
- 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.
|
|
3422
|
+
- 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.
|
|
3384
3423
|
|
|
3385
3424
|
You receive:
|
|
3386
3425
|
- USER REQUEST: what the user asked.
|
|
@@ -3388,20 +3427,28 @@ You receive:
|
|
|
3388
3427
|
- PROBED THIS TURN: what memory-partition-recall already surfaced for this turn (may be empty) \u2014 already known, never re-store.
|
|
3389
3428
|
- GATHERED DATA: summarized tool results from this turn (web searches, lookups).
|
|
3390
3429
|
|
|
3391
|
-
Store into the PARTITION lane (call memory-partition-remember) only when it is durable and user-specific:
|
|
3392
|
-
- A
|
|
3393
|
-
- A notable fact the user asks you to track or remember.
|
|
3430
|
+
Store into the PARTITION lane (call memory-partition-remember) only when it is durable, objective, and user-specific:
|
|
3431
|
+
- 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).
|
|
3394
3432
|
- Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.
|
|
3395
3433
|
|
|
3396
|
-
|
|
3434
|
+
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.
|
|
3435
|
+
|
|
3436
|
+
Store into the COGNITION lane (call memory-cognition-remember) whenever the turn yields SUBJECTIVE user data, stated or derived:
|
|
3437
|
+
- 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.
|
|
3397
3438
|
- An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.
|
|
3398
|
-
- Never
|
|
3439
|
+
- Never an objective fact \u2014 those belong in the partition lane.
|
|
3399
3440
|
|
|
3400
3441
|
STORAGE MECHANICS \u2014 how your memory works (write for the retriever):
|
|
3401
3442
|
- 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").
|
|
3402
3443
|
- Restating a record verbatim OVERWRITES it in place \u2014 updates are restatements of the full corrected statement, not diffs.
|
|
3403
3444
|
- 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").
|
|
3404
|
-
-
|
|
3445
|
+
- 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):
|
|
3446
|
+
- category (CLUSTER): ONE lowercase PLURAL family noun \u2014 stocks, games, pets, work, health, finance, contacts \u2026
|
|
3447
|
+
- community (COMMUNITY): ONE lowercase PLURAL sub-family narrowing the category ("survival games" under "games"); omit when no sub-family applies.
|
|
3448
|
+
- 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.
|
|
3449
|
+
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". Always include category; reuse the existing labels whenever they fit.
|
|
3450
|
+
|
|
3451
|
+
TAXONOMY PROBING (pick first, create if necessary): before naming a community or hub you are not certain exists, call memory-taxonomy-probe top-down \u2014 cluster \u2192 community \u2192 hub \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) 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.
|
|
3405
3452
|
|
|
3406
3453
|
Do NOT store:
|
|
3407
3454
|
- Public facts merely fetched this turn that do not relate to the user (e.g. generic web results).
|
|
@@ -3414,7 +3461,7 @@ Rules:
|
|
|
3414
3461
|
- Call each remember tool once per distinct durable item \u2014 no more.
|
|
3415
3462
|
- 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.`;
|
|
3416
3463
|
function buildMemoryWritePrompt(params) {
|
|
3417
|
-
const vocabulary = buildVocabularySection(params.
|
|
3464
|
+
const vocabulary = buildVocabularySection(params.vocabulary);
|
|
3418
3465
|
return [
|
|
3419
3466
|
`USER REQUEST: ${params.userRequest}`,
|
|
3420
3467
|
`PRIOR MEMORY: ${params.priorMemory?.trim() || "(none stored yet)"}`,
|
|
@@ -3424,7 +3471,7 @@ function buildMemoryWritePrompt(params) {
|
|
|
3424
3471
|
MEMORY_WRITE_VERDICT
|
|
3425
3472
|
].filter(Boolean).join("\n\n");
|
|
3426
3473
|
}
|
|
3427
|
-
var MEMORY_WRITE_VERDICT = 'Decide: store each durable
|
|
3474
|
+
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.';
|
|
3428
3475
|
var ResearchFrictionQueryDecisionSchema = z.object({
|
|
3429
3476
|
/** The friction id — echoed back so the worker maps the verdict to its candidate. */
|
|
3430
3477
|
id: z.string(),
|
|
@@ -3520,6 +3567,42 @@ function buildResearchTriagePrompt(gaps, maxPayloadChars) {
|
|
|
3520
3567
|
return [`GAPS:
|
|
3521
3568
|
${limitText(body, maxPayloadChars)}`, "Write the decisions JSON object now."].join("\n\n");
|
|
3522
3569
|
}
|
|
3570
|
+
var TaxonomyPairVerdictSchema = z.object({
|
|
3571
|
+
/**
|
|
3572
|
+
* `same` — the two labels name the same concept (a wording/casing/plural
|
|
3573
|
+
* variant) and merge. `distinct` — genuinely different concepts that only
|
|
3574
|
+
* look alike; keep both. When in doubt: DISTINCT.
|
|
3575
|
+
*/
|
|
3576
|
+
verdict: z.enum(["same", "distinct"]),
|
|
3577
|
+
/** One short sentence justifying the verdict (audit trail). */
|
|
3578
|
+
reason: z.string().optional()
|
|
3579
|
+
});
|
|
3580
|
+
|
|
3581
|
+
// src/prompts/memory/taxonomy-reconcile-prompt.constant.ts
|
|
3582
|
+
var TAXONOMY_RECONCILE_INSTRUCTIONS = `TAXONOMY RECONCILIATION \u2014 one purpose: decide whether two EXISTING taxonomy labels of the same tier name the same concept and should merge into one.
|
|
3583
|
+
|
|
3584
|
+
The macro-taxonomy, top-down: CLUSTER (plural family, e.g. "games") \u2192 COMMUNITY (plural sub-family, e.g. "survival-games") \u2192 HUB (singular subject entity, e.g. "project zomboid") \u2192 plus TAG labels (narrow recall vocabulary).
|
|
3585
|
+
|
|
3586
|
+
Merge ONLY wording variants of one concept: casing/formatting drift ("Video Games" / "video-games"), singular/plural drift inside a family tier ("survival game" / "survival-games"), abbreviation with identical expansion ("nlp" / "natural-language-processing").
|
|
3587
|
+
NEVER merge: two entities that merely share a word ("apple" the company vs "apple" the fruit), a parent and its child ("games" vs "survival-games"), a broad tier and a specific entity ("games" vs "project zomboid"), or two genuinely different topics that happen to look similar. When in doubt, answer DISTINCT \u2014 a missed merge is cleaned up later; a wrong merge destroys both labels' meaning forever.`;
|
|
3588
|
+
function buildTaxonomyPairPrompt(params) {
|
|
3589
|
+
return `TIER: ${params.kind}
|
|
3590
|
+
LABEL A: "${params.labelA}" (used by ${params.countA} records)
|
|
3591
|
+
LABEL B: "${params.labelB}" (used by ${params.countB} records)
|
|
3592
|
+
|
|
3593
|
+
Decide: do these two labels name the SAME concept (merge) or are they DISTINCT (keep both)?`;
|
|
3594
|
+
}
|
|
3595
|
+
function buildTaxonomyReconcileSystemPrompt() {
|
|
3596
|
+
return buildStructuredPrompt(TaxonomyPairVerdictSchema, {
|
|
3597
|
+
before: `${TAXONOMY_RECONCILE_INSTRUCTIONS}
|
|
3598
|
+
|
|
3599
|
+
OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:`,
|
|
3600
|
+
after: `
|
|
3601
|
+
RULES:
|
|
3602
|
+
- Return ONLY a single valid JSON object matching the exact schema above.
|
|
3603
|
+
- No markdown code fences, no explanations, preamble, or postscript.`
|
|
3604
|
+
});
|
|
3605
|
+
}
|
|
3523
3606
|
var FACT_KINDS = [
|
|
3524
3607
|
"preference",
|
|
3525
3608
|
"decision",
|
|
@@ -3539,16 +3622,26 @@ var ExtractedFactSchema = z.object({
|
|
|
3539
3622
|
text: z.string(),
|
|
3540
3623
|
/**
|
|
3541
3624
|
* The lowercase entity the fact is about (default `user`; a person,
|
|
3542
|
-
* product, or project name)
|
|
3625
|
+
* product, or project name) — the constellation's HUB tier: singular,
|
|
3626
|
+
* specific, stable. Maintenance adjudication only ever compares
|
|
3543
3627
|
* facts about the SAME subject.
|
|
3544
3628
|
*/
|
|
3545
3629
|
subject: z.string().optional(),
|
|
3546
3630
|
/**
|
|
3547
3631
|
* One broad lowercase PLURAL family label for THIS fact (e.g. `stocks`,
|
|
3548
|
-
* `pets`, `games`) —
|
|
3632
|
+
* `pets`, `games`) — the constellation's CLUSTER tier. Inherits the
|
|
3633
|
+
* turn-side category when omitted. Never
|
|
3549
3634
|
* a specific entity, product, company, or game title.
|
|
3550
3635
|
*/
|
|
3551
3636
|
category: z.string().optional(),
|
|
3637
|
+
/**
|
|
3638
|
+
* One lowercase PLURAL sub-family label narrowing THIS fact's category
|
|
3639
|
+
* (e.g. `survival-games` under `games`) — the constellation's COMMUNITY
|
|
3640
|
+
* tier, one level below the cluster. Inherits the turn-side community when
|
|
3641
|
+
* omitted; omit when no sub-family applies. Never a specific entity,
|
|
3642
|
+
* product, or title.
|
|
3643
|
+
*/
|
|
3644
|
+
community: z.string().optional(),
|
|
3552
3645
|
/** What kind of durable thing this is (see FACT_KINDS). */
|
|
3553
3646
|
kind: z.enum(FACT_KINDS),
|
|
3554
3647
|
/** Whether a newer statement is expected to replace this one (see FACT_STABILITIES). */
|
|
@@ -3571,34 +3664,49 @@ var ExtractionSchema = z.object({
|
|
|
3571
3664
|
tags: z.array(z.string()),
|
|
3572
3665
|
/**
|
|
3573
3666
|
* One broad lowercase PLURAL family label for the whole turn-side (e.g.
|
|
3574
|
-
* `stocks`, `pets`, `games`) —
|
|
3575
|
-
*
|
|
3576
|
-
* passes, and backstops facts that omit their own `category`. Never a
|
|
3667
|
+
* `stocks`, `pets`, `games`) — the constellation's CLUSTER tier. Groups
|
|
3668
|
+
* the narrow tags into one topic family, powers the relink job's
|
|
3669
|
+
* per-category passes, and backstops facts that omit their own `category`. Never a
|
|
3577
3670
|
* specific entity, product, company, or game title: `amd` belongs under
|
|
3578
3671
|
* `stocks`; `stellar blade` belongs under `games`. Optional: a turn with
|
|
3579
3672
|
* nothing durable may omit it.
|
|
3580
3673
|
*/
|
|
3581
|
-
category: z.string().optional()
|
|
3674
|
+
category: z.string().optional(),
|
|
3675
|
+
/**
|
|
3676
|
+
* One lowercase PLURAL sub-family label narrowing the turn-side category
|
|
3677
|
+
* (e.g. `survival-games` under `games`) — the constellation's COMMUNITY
|
|
3678
|
+
* tier: a genre, project family, or domain branch one level below the
|
|
3679
|
+
* cluster. Backstops facts that omit their own `community`. Optional:
|
|
3680
|
+
* omit it when no sub-family applies. Never a specific entity, product,
|
|
3681
|
+
* or title.
|
|
3682
|
+
*/
|
|
3683
|
+
community: z.string().optional()
|
|
3582
3684
|
});
|
|
3583
3685
|
|
|
3584
3686
|
// src/prompts/memory/vectorize-prompt.constant.ts
|
|
3585
|
-
function buildExtractionPrompt(
|
|
3687
|
+
function buildExtractionPrompt(vocabulary = {}) {
|
|
3586
3688
|
return buildStructuredPrompt(ExtractionSchema, {
|
|
3587
3689
|
before: "OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:",
|
|
3588
3690
|
after: `
|
|
3589
3691
|
YOUR TASK \u2014 decide what is worth remembering:
|
|
3590
|
-
-
|
|
3591
|
-
-
|
|
3692
|
+
- 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.
|
|
3693
|
+
- 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").
|
|
3694
|
+
- 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".
|
|
3592
3695
|
- Facts must be self-contained \u2014 no "this"/"that" references; write them as third-person statements.
|
|
3593
|
-
- 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 ("
|
|
3594
|
-
- 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.
|
|
3595
|
-
|
|
3596
|
-
FACT METADATA \u2014 every fact object carries the fields the maintenance passes (consolidate/reflect/conviction) interpret:
|
|
3696
|
+
- 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").
|
|
3697
|
+
- 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.
|
|
3698
|
+
|
|
3699
|
+
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, where the NODE is the fact itself (never named) and each tier above it narrows where it is filed:
|
|
3700
|
+
- CLUSTER (category): a broad PLURAL family noun ("games", "stocks", "pets").
|
|
3701
|
+
- COMMUNITY (community): a PLURAL sub-family under one cluster ("survival-games" under "games") \u2014 a genre or domain branch.
|
|
3702
|
+
- HUB (subject): the SINGULAR main subject entity anchoring the fact ("project zomboid", "amd", "sam") \u2014 a specific name, never pluralized.
|
|
3703
|
+
Fields:
|
|
3597
3704
|
- text: the statement itself.
|
|
3598
|
-
- 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.
|
|
3599
|
-
- category (optional): ONE broad lowercase PLURAL family label for this fact
|
|
3705
|
+
- subject (optional): the lowercase SINGULAR entity the fact is about \u2014 the HUB tier \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.
|
|
3706
|
+
- category (optional): ONE broad lowercase PLURAL family label for this fact \u2014 the CLUSTER tier \u2014 reusing the known vocabulary. Inherits the turn-side category when omitted.
|
|
3707
|
+
- community (optional): ONE 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"). Inherits the turn-side community when omitted; omit when no sub-family applies.
|
|
3600
3708
|
- kind (required): what kind of durable thing it is:
|
|
3601
|
-
- preference \u2014 likes, dislikes, wants,
|
|
3709
|
+
- preference \u2014 RESERVED, never emit: likes, dislikes, wants, and interests are subjective user data owned by the cognition tier (see ROUTING BOUNDARY)
|
|
3602
3710
|
- decision \u2014 a choice that was made (adoptions, migrations, purchases committed to)
|
|
3603
3711
|
- state \u2014 the CURRENT, changeable situation (lives in X, uses version Y, runs Z) \u2014 newer statements supersede these
|
|
3604
3712
|
- contact \u2014 contact details of a person (phone, email, address)
|
|
@@ -3608,9 +3716,10 @@ FACT METADATA \u2014 every fact object carries the fields the maintenance passes
|
|
|
3608
3716
|
- fact \u2014 any other durable fact
|
|
3609
3717
|
- 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.
|
|
3610
3718
|
- 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.
|
|
3611
|
-
- Category: ONE broad lowercase PLURAL family noun for the whole text (e.g. "stocks", "pets", "games", "health") 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". Always include it when facts are emitted; omit it when nothing durable is found.
|
|
3719
|
+
- 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". Always include it when facts are emitted; omit it when nothing durable is found.
|
|
3720
|
+
- Community: ONE broad lowercase PLURAL sub-family that narrows the category (e.g. "survival-games", "action-rpgs" under "games") \u2014 the COMMUNITY tier between the cluster and the hub. Omit it when no sub-family applies; never a specific entity, product, or title.
|
|
3612
3721
|
- If nothing durable is found, return an empty facts array; tags may still label the topic when useful.
|
|
3613
|
-
${buildVocabularySection(
|
|
3722
|
+
${buildVocabularySection(vocabulary)}
|
|
3614
3723
|
PRIOR MEMORY (when the user message ends with an "ALREADY STORED IN MEMORY" section):
|
|
3615
3724
|
- That section lists facts already stored in YOUR long-term memory from prior turns. NEVER emit a fact already covered there.
|
|
3616
3725
|
- 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).
|
|
@@ -3666,4 +3775,4 @@ Compose the response from the snippets below. Include every snippet you can subs
|
|
|
3666
3775
|
${parts.join("\n\n")}`;
|
|
3667
3776
|
}
|
|
3668
3777
|
|
|
3669
|
-
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 };
|
|
3778
|
+
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, TAXONOMY_RECONCILE_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, 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 };
|