@triplef/agent 0.1.7 → 0.1.10
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/prompts/index.d.ts +7 -3
- package/dist/prompts/index.mjs +73 -10
- package/dist/schemas/index.d.ts +7 -1
- package/dist/schemas/index.mjs +21 -3
- package/dist/tools/index.mjs +2 -2
- package/package.json +4 -4
package/dist/prompts/index.d.ts
CHANGED
|
@@ -93,6 +93,8 @@ declare function buildConsolidatePrompt(params: {
|
|
|
93
93
|
candidates: ConsolidateProvenanceLine[];
|
|
94
94
|
}): string;
|
|
95
95
|
|
|
96
|
+
declare function buildEnrichPrompt(): string;
|
|
97
|
+
|
|
96
98
|
declare const MEMORY_PROFILE_INSTRUCTIONS: string;
|
|
97
99
|
declare function buildMemoryProfilePrompt(params: {
|
|
98
100
|
userRequest: string;
|
|
@@ -109,15 +111,17 @@ declare function buildMemoryProfilePrompt(params: {
|
|
|
109
111
|
maxPayloadChars?: number;
|
|
110
112
|
}): string;
|
|
111
113
|
|
|
112
|
-
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 user's OWN statements (facts they stated or asked you to remember).\n- memory-cognition = YOUR derived understanding of the user (inferred traits, standing interests, connections).\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 and user-specific:\n- A preference, interest, or durable detail the user states about themselves (favorite X, their setup, contact info, a decision \u2014 however phrased, any language).\n- A notable fact the user asks you to track or remember.\n- Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.\n\nStore into the COGNITION lane (call memory-cognition-remember) only when it is something you LEARN about the user that they did not state outright:\n- An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.\n- Never a stated 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
|
|
114
|
+
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 user's OWN statements (facts they stated or asked you to remember).\n- memory-cognition = YOUR derived understanding of the user (inferred traits, standing interests, connections).\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 and user-specific:\n- A preference, interest, or durable detail the user states about themselves (favorite X, their setup, contact info, a decision \u2014 however phrased, any language).\n- A notable fact the user asks you to track or remember.\n- Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.\n\nStore into the COGNITION lane (call memory-cognition-remember) only when it is something you LEARN about the user that they did not state outright:\n- An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.\n- Never a stated 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.";
|
|
113
115
|
declare function buildMemoryWritePrompt(params: {
|
|
114
116
|
userRequest: string;
|
|
115
117
|
priorMemory?: string;
|
|
116
118
|
probedMemory?: string;
|
|
117
119
|
gathered?: string;
|
|
120
|
+
knownCategories?: string[];
|
|
121
|
+
knownTags?: string[];
|
|
118
122
|
}): string;
|
|
119
123
|
|
|
120
|
-
declare function buildExtractionPrompt(): string;
|
|
124
|
+
declare function buildExtractionPrompt(knownCategories?: readonly string[], knownTags?: readonly string[]): string;
|
|
121
125
|
declare function buildExtractionCorrectionPrompt(error: string): string;
|
|
122
126
|
|
|
123
127
|
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.";
|
|
@@ -283,4 +287,4 @@ declare const verdictSpineSnippet: TemplateSnippet;
|
|
|
283
287
|
|
|
284
288
|
declare const videoGallerySnippet: TemplateSnippet;
|
|
285
289
|
|
|
286
|
-
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, type ContentSystemPromptParams, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, FINAL_REMINDER, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, 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, 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, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildOutputContract, buildSnippetInstruction, buildSourcePolicyPrompt, buildStructuredJsonPrompt, buildStructuredPrompt, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatToolAvailabilityCatalog, formatToolCatalog, 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 };
|
|
290
|
+
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, type ContentSystemPromptParams, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, FINAL_REMINDER, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, 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, 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, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildEnrichPrompt, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildOutputContract, buildSnippetInstruction, buildSourcePolicyPrompt, buildStructuredJsonPrompt, buildStructuredPrompt, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatToolAvailabilityCatalog, formatToolCatalog, 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
|
@@ -628,6 +628,13 @@ var ConsolidationVerdictSchema = z.object({
|
|
|
628
628
|
),
|
|
629
629
|
mergedText: z.string().optional().describe("Required with verdict=merge: one fuller self-contained statement (full restatement, never a diff).")
|
|
630
630
|
});
|
|
631
|
+
var MemoryEnrichmentSchema = z.object({
|
|
632
|
+
/**
|
|
633
|
+
* 2–6 stable, reusable lowercase topic labels for the record — the existing
|
|
634
|
+
* tags kept plus any missing labels that would help topic-filtered recall.
|
|
635
|
+
*/
|
|
636
|
+
tags: z.array(z.string())
|
|
637
|
+
});
|
|
631
638
|
var ExtractionSchema = z.object({
|
|
632
639
|
/**
|
|
633
640
|
* Durable, self-contained facts worth remembering in a later, unrelated
|
|
@@ -637,9 +644,20 @@ var ExtractionSchema = z.object({
|
|
|
637
644
|
facts: z.array(z.string()),
|
|
638
645
|
/**
|
|
639
646
|
* 2–6 stable, reusable lowercase topic labels describing the text; the open
|
|
640
|
-
* vocabulary that powers topic-filtered recall.
|
|
647
|
+
* vocabulary that powers topic-filtered recall. Tags are NARROW and
|
|
648
|
+
* specific — entity names, product names, game titles (e.g. `amd`,
|
|
649
|
+
* `stellar blade`, `stellar blade blood rain`).
|
|
641
650
|
*/
|
|
642
|
-
tags: z.array(z.string())
|
|
651
|
+
tags: z.array(z.string()),
|
|
652
|
+
/**
|
|
653
|
+
* One broad lowercase PLURAL family label for the whole turn-side (e.g.
|
|
654
|
+
* `stocks`, `pets`, `games`) — groups the narrow tags into one topic family
|
|
655
|
+
* for the constellation's community tier and the relink job's per-category
|
|
656
|
+
* passes. Never a specific entity, product, company, or game title: `amd`
|
|
657
|
+
* belongs under `stocks`; `stellar blade` belongs under `games`. Optional:
|
|
658
|
+
* a turn with nothing durable may omit it.
|
|
659
|
+
*/
|
|
660
|
+
category: z.string().optional()
|
|
643
661
|
});
|
|
644
662
|
var nullishText = z.string().nullish();
|
|
645
663
|
var nullishTopics = z.array(z.string()).nullish();
|
|
@@ -3045,6 +3063,27 @@ ${candidates}`,
|
|
|
3045
3063
|
"Decide exactly one verdict (keep / redundant / merge) and output ONLY the JSON object."
|
|
3046
3064
|
].join("\n\n");
|
|
3047
3065
|
}
|
|
3066
|
+
|
|
3067
|
+
// src/prompts/memory/memory-enrich-prompt.constant.ts
|
|
3068
|
+
function buildEnrichPrompt() {
|
|
3069
|
+
return buildStructuredPrompt(MemoryEnrichmentSchema, {
|
|
3070
|
+
before: "OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:",
|
|
3071
|
+
after: `
|
|
3072
|
+
YOUR TASK \u2014 refine the topic labels of ONE stored memory record:
|
|
3073
|
+
- Keep the existing tags that are still accurate and reusable.
|
|
3074
|
+
- Add any missing stable, lowercase topic labels that would help a future topic-filtered recall find this record.
|
|
3075
|
+
- 2 to 6 tags total, lowercase, reusable, deduplicated.
|
|
3076
|
+
- Tags are labels only \u2014 never rewrite or summarize the record text itself.
|
|
3077
|
+
|
|
3078
|
+
RULES:
|
|
3079
|
+
- Return ONLY a single valid JSON object matching the exact schema above.
|
|
3080
|
+
- No markdown code fences, no explanations, preamble, or postscript.
|
|
3081
|
+
- Never output undefined or null. The key is always present (empty array when no tags apply).
|
|
3082
|
+
|
|
3083
|
+
FINAL REMINDER:
|
|
3084
|
+
- Output ONLY valid JSON matching the exact schema above. No markdown code fences, no explanations, preamble, or postscript.`
|
|
3085
|
+
});
|
|
3086
|
+
}
|
|
3048
3087
|
var MEMORY_PROFILE_INSTRUCTIONS = buildStructuredPrompt(memoryProfileResponseSchema, {
|
|
3049
3088
|
before: `COGNITION JOB \u2014 maintain YOUR evolving understanding of THIS user.
|
|
3050
3089
|
|
|
@@ -3134,8 +3173,8 @@ Store into the COGNITION lane (call memory-cognition-remember) only when it is s
|
|
|
3134
3173
|
STORAGE MECHANICS \u2014 how your memory works (write for the retriever):
|
|
3135
3174
|
- 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").
|
|
3136
3175
|
- Restating a record verbatim OVERWRITES it in place \u2014 updates are restatements of the full corrected statement, not diffs.
|
|
3137
|
-
- tags are the ONLY topic-filter vocabulary at recall \u2014 reuse stable, lowercase
|
|
3138
|
-
- category is the broad family the fact belongs to (partition lane only): ONE lowercase
|
|
3176
|
+
- 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").
|
|
3177
|
+
- 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.
|
|
3139
3178
|
|
|
3140
3179
|
Do NOT store:
|
|
3141
3180
|
- Public facts merely fetched this turn that do not relate to the user (e.g. generic web results).
|
|
@@ -3148,18 +3187,31 @@ Rules:
|
|
|
3148
3187
|
- Call each remember tool once per distinct durable item \u2014 no more.
|
|
3149
3188
|
- 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.`;
|
|
3150
3189
|
function buildMemoryWritePrompt(params) {
|
|
3190
|
+
const vocabulary = buildVocabularySection(params.knownCategories, params.knownTags);
|
|
3151
3191
|
return [
|
|
3152
3192
|
`USER REQUEST: ${params.userRequest}`,
|
|
3153
3193
|
`PRIOR MEMORY: ${params.priorMemory?.trim() || "(none stored yet)"}`,
|
|
3154
3194
|
`PROBED THIS TURN: ${params.probedMemory?.trim() || "(nothing probed this turn)"}`,
|
|
3155
3195
|
`GATHERED DATA: ${params.gathered?.trim() || "(no tools produced data this turn)"}`,
|
|
3196
|
+
vocabulary,
|
|
3156
3197
|
MEMORY_WRITE_VERDICT
|
|
3157
|
-
].join("\n\n");
|
|
3198
|
+
].filter(Boolean).join("\n\n");
|
|
3199
|
+
}
|
|
3200
|
+
function buildVocabularySection(knownCategories = [], knownTags = []) {
|
|
3201
|
+
if (knownCategories.length === 0 && knownTags.length === 0) return "";
|
|
3202
|
+
const lines = [];
|
|
3203
|
+
if (knownCategories.length > 0) {
|
|
3204
|
+
lines.push(
|
|
3205
|
+
`KNOWN CATEGORIES (reuse one when it fits; only mint a new plural family noun when none applies): ${knownCategories.join(", ")}`
|
|
3206
|
+
);
|
|
3207
|
+
}
|
|
3208
|
+
if (knownTags.length > 0) lines.push(`KNOWN TOPICS (reuse these tag labels when they fit): ${knownTags.join(", ")}`);
|
|
3209
|
+
return lines.join("\n");
|
|
3158
3210
|
}
|
|
3159
3211
|
var MEMORY_WRITE_VERDICT = 'Decide: store each durable user-specific fact with one memory-partition-remember call, each derived understanding with one memory-cognition-remember call, or answer "none" if the turn surfaced nothing durable about this user.';
|
|
3160
3212
|
|
|
3161
3213
|
// src/prompts/memory/vectorize-prompt.constant.ts
|
|
3162
|
-
function buildExtractionPrompt() {
|
|
3214
|
+
function buildExtractionPrompt(knownCategories = [], knownTags = []) {
|
|
3163
3215
|
return buildStructuredPrompt(ExtractionSchema, {
|
|
3164
3216
|
before: "OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:",
|
|
3165
3217
|
after: `
|
|
@@ -3169,9 +3221,10 @@ YOUR TASK \u2014 decide what is worth remembering:
|
|
|
3169
3221
|
- Facts must be self-contained \u2014 no "this"/"that" references; write them as third-person statements.
|
|
3170
3222
|
- 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 ("User prefers single-line if statements", not "They prefer that style").
|
|
3171
3223
|
- 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.
|
|
3172
|
-
- Tags: 2 to 6 stable, reusable, lowercase topic labels describing what the text is about (e.g. "work", "rust", "contacts"). They are the vocabulary for topic-filtered recall later.
|
|
3224
|
+
- 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.
|
|
3225
|
+
- 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.
|
|
3173
3226
|
- If nothing durable is found, return an empty facts array; tags may still label the topic when useful.
|
|
3174
|
-
|
|
3227
|
+
${buildVocabularySection2(knownCategories, knownTags)}
|
|
3175
3228
|
PRIOR MEMORY (when the user message ends with an "ALREADY STORED IN MEMORY" section):
|
|
3176
3229
|
- That section lists facts already stored in YOUR long-term memory from prior turns. NEVER emit a fact already covered there.
|
|
3177
3230
|
- 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).
|
|
@@ -3187,12 +3240,22 @@ FINAL REMINDER:
|
|
|
3187
3240
|
- Output ONLY valid JSON matching the exact schema above. No markdown code fences, no explanations, preamble, or postscript.`
|
|
3188
3241
|
});
|
|
3189
3242
|
}
|
|
3243
|
+
function buildVocabularySection2(knownCategories, knownTags) {
|
|
3244
|
+
if (knownCategories.length === 0 && knownTags.length === 0) return "";
|
|
3245
|
+
const lines = [];
|
|
3246
|
+
if (knownCategories.length > 0)
|
|
3247
|
+
lines.push(
|
|
3248
|
+
`KNOWN CATEGORIES (reuse one when it fits; only mint a new plural family noun when none applies): ${knownCategories.join(", ")}`
|
|
3249
|
+
);
|
|
3250
|
+
if (knownTags.length > 0) lines.push(`KNOWN TOPICS (reuse these tag labels when they fit): ${knownTags.join(", ")}`);
|
|
3251
|
+
return lines.join("\n");
|
|
3252
|
+
}
|
|
3190
3253
|
function buildExtractionCorrectionPrompt(error) {
|
|
3191
3254
|
return `Your previous response was not valid.
|
|
3192
3255
|
Error: ${error}
|
|
3193
3256
|
|
|
3194
3257
|
Return ONLY a single valid JSON object matching the extraction schema exactly:
|
|
3195
|
-
{"facts": [string, ...], "tags": [string, ...]}
|
|
3258
|
+
{"facts": [string, ...], "tags": [string, ...], "category": "string"}
|
|
3196
3259
|
All object keys must be quoted with double quotes.
|
|
3197
3260
|
Do not add markdown code fences, explanations, or extra text.
|
|
3198
3261
|
|
|
@@ -3227,4 +3290,4 @@ Compose the response from the snippets below. Include every snippet you can subs
|
|
|
3227
3290
|
${parts.join("\n\n")}`;
|
|
3228
3291
|
}
|
|
3229
3292
|
|
|
3230
|
-
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, DEFAULT_VARIANT_ID, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, FINAL_REMINDER, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, 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, 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, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildOutputContract, buildSnippetInstruction, buildSourcePolicyPrompt, buildStructuredJsonPrompt, buildStructuredPrompt, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatToolAvailabilityCatalog, formatToolCatalog, 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 };
|
|
3293
|
+
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, DEFAULT_VARIANT_ID, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, FINAL_REMINDER, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, 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, 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, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildEnrichPrompt, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildOutputContract, buildSnippetInstruction, buildSourcePolicyPrompt, buildStructuredJsonPrompt, buildStructuredPrompt, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatToolAvailabilityCatalog, formatToolCatalog, 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
|
@@ -184,9 +184,15 @@ declare const ConsolidationVerdictSchema: z.ZodObject<{
|
|
|
184
184
|
}, z.core.$strip>;
|
|
185
185
|
type ConsolidationVerdict = z.infer<typeof ConsolidationVerdictSchema>;
|
|
186
186
|
|
|
187
|
+
declare const MemoryEnrichmentSchema: z.ZodObject<{
|
|
188
|
+
tags: z.ZodArray<z.ZodString>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
type MemoryEnrichment = z.infer<typeof MemoryEnrichmentSchema>;
|
|
191
|
+
|
|
187
192
|
declare const ExtractionSchema: z.ZodObject<{
|
|
188
193
|
facts: z.ZodArray<z.ZodString>;
|
|
189
194
|
tags: z.ZodArray<z.ZodString>;
|
|
195
|
+
category: z.ZodOptional<z.ZodString>;
|
|
190
196
|
}, z.core.$strip>;
|
|
191
197
|
type MemoryExtraction = z.infer<typeof ExtractionSchema>;
|
|
192
198
|
|
|
@@ -902,4 +908,4 @@ declare const videolistSchema: z.ZodObject<{
|
|
|
902
908
|
}, z.core.$strip>>>;
|
|
903
909
|
}, z.core.$strip>;
|
|
904
910
|
|
|
905
|
-
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, type ConsolidationVerdict, ConsolidationVerdictSchema, 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, ExtractionSchema, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, type LexiconSearchResult, type LexiconSelectInput, type LexiconSelectResult, type LexiconSelectedChunk, type LexiconSourceDocument, MEMORY_TOOL_NAMES, type MemoryCognitionProfile, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, NON_PAGE_EXTENSIONS, type ProviderConfig, TOOL_DESCRIPTIONS, TOOL_NAMES, type ToolName, VARIANT_NAMES, type VariantName, 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 };
|
|
911
|
+
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, type ConsolidationVerdict, ConsolidationVerdictSchema, 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, ExtractionSchema, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, type LexiconSearchResult, type LexiconSelectInput, type LexiconSelectResult, type LexiconSelectedChunk, type LexiconSourceDocument, MEMORY_TOOL_NAMES, type MemoryCognitionProfile, type MemoryEnrichment, MemoryEnrichmentSchema, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, NON_PAGE_EXTENSIONS, type ProviderConfig, TOOL_DESCRIPTIONS, TOOL_NAMES, type ToolName, VARIANT_NAMES, type VariantName, 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 };
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -474,6 +474,13 @@ var ConsolidationVerdictSchema = z.object({
|
|
|
474
474
|
),
|
|
475
475
|
mergedText: z.string().optional().describe("Required with verdict=merge: one fuller self-contained statement (full restatement, never a diff).")
|
|
476
476
|
});
|
|
477
|
+
var MemoryEnrichmentSchema = z.object({
|
|
478
|
+
/**
|
|
479
|
+
* 2–6 stable, reusable lowercase topic labels for the record — the existing
|
|
480
|
+
* tags kept plus any missing labels that would help topic-filtered recall.
|
|
481
|
+
*/
|
|
482
|
+
tags: z.array(z.string())
|
|
483
|
+
});
|
|
477
484
|
var ExtractionSchema = z.object({
|
|
478
485
|
/**
|
|
479
486
|
* Durable, self-contained facts worth remembering in a later, unrelated
|
|
@@ -483,9 +490,20 @@ var ExtractionSchema = z.object({
|
|
|
483
490
|
facts: z.array(z.string()),
|
|
484
491
|
/**
|
|
485
492
|
* 2–6 stable, reusable lowercase topic labels describing the text; the open
|
|
486
|
-
* vocabulary that powers topic-filtered recall.
|
|
493
|
+
* vocabulary that powers topic-filtered recall. Tags are NARROW and
|
|
494
|
+
* specific — entity names, product names, game titles (e.g. `amd`,
|
|
495
|
+
* `stellar blade`, `stellar blade blood rain`).
|
|
487
496
|
*/
|
|
488
|
-
tags: z.array(z.string())
|
|
497
|
+
tags: z.array(z.string()),
|
|
498
|
+
/**
|
|
499
|
+
* One broad lowercase PLURAL family label for the whole turn-side (e.g.
|
|
500
|
+
* `stocks`, `pets`, `games`) — groups the narrow tags into one topic family
|
|
501
|
+
* for the constellation's community tier and the relink job's per-category
|
|
502
|
+
* passes. Never a specific entity, product, company, or game title: `amd`
|
|
503
|
+
* belongs under `stocks`; `stellar blade` belongs under `games`. Optional:
|
|
504
|
+
* a turn with nothing durable may omit it.
|
|
505
|
+
*/
|
|
506
|
+
category: z.string().optional()
|
|
489
507
|
});
|
|
490
508
|
var nullishText = z.string().nullish();
|
|
491
509
|
var nullishTopics = z.array(z.string()).nullish();
|
|
@@ -1058,4 +1076,4 @@ var videolistSchema = z.object({
|
|
|
1058
1076
|
internationalCoverage: internationalCoverageSchema.optional()
|
|
1059
1077
|
});
|
|
1060
1078
|
|
|
1061
|
-
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, ConsolidationVerdictSchema, DEFAULT_VARIANT_ID, 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, ExtractionSchema, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, NON_PAGE_EXTENSIONS, 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, 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 };
|
|
1079
|
+
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, ConsolidationVerdictSchema, DEFAULT_VARIANT_ID, 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, ExtractionSchema, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, MemoryEnrichmentSchema, NON_PAGE_EXTENSIONS, 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, 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 };
|
package/dist/tools/index.mjs
CHANGED
|
@@ -960,10 +960,10 @@ ${lines.join("\n")}`;
|
|
|
960
960
|
var memoryPartitionRememberSchema = z.object({
|
|
961
961
|
text: z.string().min(1).max(2e3).describe('The fact to remember, as a self-contained statement, e.g. "Sams phone number is 555-1234".'),
|
|
962
962
|
category: z.string().min(1).max(40).optional().describe(
|
|
963
|
-
'One broad lowercase category the fact belongs to, e.g. "games", "pets", "work", "
|
|
963
|
+
'One broad lowercase PLURAL category the fact belongs to, e.g. "stocks", "games", "pets", "work" \u2014 a family noun, never a specific entity/product/company/game name ("amd" \u2192 "stocks"; "stellar blade" \u2192 "games"). Always include it.'
|
|
964
964
|
),
|
|
965
965
|
tags: z.array(z.string().min(1).max(40)).max(8).optional().describe(
|
|
966
|
-
'Optional topic labels (lowercase, reusable) so future recall can filter by topic, e.g. ["contacts", "sam"].'
|
|
966
|
+
'Optional topic labels (lowercase, reusable, NARROW \u2014 entity/product/game names) so future recall can filter by topic, e.g. ["contacts", "sam"], ["amd"], ["stellar blade"].'
|
|
967
967
|
)
|
|
968
968
|
});
|
|
969
969
|
function createMemoryPartitionRememberTool(deps) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@triplef/agent",
|
|
3
3
|
"description": "tripleF (3F) agent domain — structured-output schemas, prompt builders, and model tools shared across the apps.",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"packageManager": "pnpm@11.
|
|
4
|
+
"version": "0.1.10",
|
|
5
|
+
"packageManager": "pnpm@11.25.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"turndown": "^7.2.4"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"ai": "^7.0.
|
|
64
|
-
"zod": "^4.5.
|
|
63
|
+
"ai": "^7.0.85",
|
|
64
|
+
"zod": "^4.5.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"ai": {
|