@triplef/agent 0.1.6 → 0.1.9
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/{intent.schema-CE2F1zLH.d.ts → intent.schema-CUQoRJ5x.d.ts} +3 -3
- package/dist/prompts/index.d.ts +6 -4
- package/dist/prompts/index.mjs +40 -3
- package/dist/schemas/index.d.ts +9 -3
- package/dist/schemas/index.mjs +16 -2
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.mjs +7 -3
- package/package.json +4 -4
|
@@ -10,7 +10,6 @@ declare const TEMPLATES: readonly ["article", "news", "describe", "compare", "oc
|
|
|
10
10
|
type TemplateName = (typeof TEMPLATES)[number];
|
|
11
11
|
declare const IntentSchema: z.ZodObject<{
|
|
12
12
|
template: z.ZodEnum<{
|
|
13
|
-
text: "text";
|
|
14
13
|
article: "article";
|
|
15
14
|
news: "news";
|
|
16
15
|
describe: "describe";
|
|
@@ -25,6 +24,7 @@ declare const IntentSchema: z.ZodObject<{
|
|
|
25
24
|
stockmarketitem: "stockmarketitem";
|
|
26
25
|
stockmarketlist: "stockmarketlist";
|
|
27
26
|
merge: "merge";
|
|
27
|
+
text: "text";
|
|
28
28
|
}>;
|
|
29
29
|
prompt: z.ZodDefault<z.ZodString>;
|
|
30
30
|
tools: z.ZodArray<z.ZodEnum<{
|
|
@@ -78,8 +78,8 @@ declare const IntentSchema: z.ZodObject<{
|
|
|
78
78
|
"memory-cognition-forget": "memory-cognition-forget";
|
|
79
79
|
}>>;
|
|
80
80
|
getDate: z.ZodDefault<z.ZodBoolean>;
|
|
81
|
-
imageCount: z.ZodPreprocess<z.ZodDefault<z.ZodNumber
|
|
82
|
-
videoCount: z.ZodPreprocess<z.ZodDefault<z.ZodNumber
|
|
81
|
+
imageCount: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
82
|
+
videoCount: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
|
|
83
83
|
reasoning: z.ZodString;
|
|
84
84
|
contextSummary: z.ZodDefault<z.ZodString>;
|
|
85
85
|
needsClarification: z.ZodDefault<z.ZodBoolean>;
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TemplateName, F as FormatZodShapeOptions } from '../intent.schema-
|
|
2
|
-
export { D as DEFAULT_VARIANT_ID } from '../intent.schema-
|
|
1
|
+
import { T as TemplateName, F as FormatZodShapeOptions } from '../intent.schema-CUQoRJ5x.js';
|
|
2
|
+
export { D as DEFAULT_VARIANT_ID } from '../intent.schema-CUQoRJ5x.js';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import { z, ZodTypeAny, ZodType } from 'zod';
|
|
5
5
|
import * as zod_v4_core from 'zod/v4/core';
|
|
@@ -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,7 +111,7 @@ 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 topics (partition lane only).\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.";
|
|
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 topics (partition lane only).\n- category is the broad family the fact belongs to (partition lane only): ONE lowercase label per remember call \u2014 games, pets, work, health, finance, contacts \u2026 \u2014 chosen so narrow topics group into families (both the nte and the wuthering waves facts carry category \"games\"). Always include it; tags stay narrow, category stays broad.\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;
|
|
@@ -283,4 +285,4 @@ declare const verdictSpineSnippet: TemplateSnippet;
|
|
|
283
285
|
|
|
284
286
|
declare const videoGallerySnippet: TemplateSnippet;
|
|
285
287
|
|
|
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 };
|
|
288
|
+
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
|
|
@@ -639,7 +646,14 @@ var ExtractionSchema = z.object({
|
|
|
639
646
|
* 2–6 stable, reusable lowercase topic labels describing the text; the open
|
|
640
647
|
* vocabulary that powers topic-filtered recall.
|
|
641
648
|
*/
|
|
642
|
-
tags: z.array(z.string())
|
|
649
|
+
tags: z.array(z.string()),
|
|
650
|
+
/**
|
|
651
|
+
* One broad lowercase family label for the whole turn-side (e.g. `work`,
|
|
652
|
+
* `pets`, `games`) — groups the narrow tags into one topic family for the
|
|
653
|
+
* constellation's community tier and the relink job's per-category passes.
|
|
654
|
+
* Optional: a turn with nothing durable may omit it.
|
|
655
|
+
*/
|
|
656
|
+
category: z.string().optional()
|
|
643
657
|
});
|
|
644
658
|
var nullishText = z.string().nullish();
|
|
645
659
|
var nullishTopics = z.array(z.string()).nullish();
|
|
@@ -3045,6 +3059,27 @@ ${candidates}`,
|
|
|
3045
3059
|
"Decide exactly one verdict (keep / redundant / merge) and output ONLY the JSON object."
|
|
3046
3060
|
].join("\n\n");
|
|
3047
3061
|
}
|
|
3062
|
+
|
|
3063
|
+
// src/prompts/memory/memory-enrich-prompt.constant.ts
|
|
3064
|
+
function buildEnrichPrompt() {
|
|
3065
|
+
return buildStructuredPrompt(MemoryEnrichmentSchema, {
|
|
3066
|
+
before: "OUTPUT FORMAT \u2014 output ONLY valid JSON matching this exact schema:",
|
|
3067
|
+
after: `
|
|
3068
|
+
YOUR TASK \u2014 refine the topic labels of ONE stored memory record:
|
|
3069
|
+
- Keep the existing tags that are still accurate and reusable.
|
|
3070
|
+
- Add any missing stable, lowercase topic labels that would help a future topic-filtered recall find this record.
|
|
3071
|
+
- 2 to 6 tags total, lowercase, reusable, deduplicated.
|
|
3072
|
+
- Tags are labels only \u2014 never rewrite or summarize the record text itself.
|
|
3073
|
+
|
|
3074
|
+
RULES:
|
|
3075
|
+
- Return ONLY a single valid JSON object matching the exact schema above.
|
|
3076
|
+
- No markdown code fences, no explanations, preamble, or postscript.
|
|
3077
|
+
- Never output undefined or null. The key is always present (empty array when no tags apply).
|
|
3078
|
+
|
|
3079
|
+
FINAL REMINDER:
|
|
3080
|
+
- Output ONLY valid JSON matching the exact schema above. No markdown code fences, no explanations, preamble, or postscript.`
|
|
3081
|
+
});
|
|
3082
|
+
}
|
|
3048
3083
|
var MEMORY_PROFILE_INSTRUCTIONS = buildStructuredPrompt(memoryProfileResponseSchema, {
|
|
3049
3084
|
before: `COGNITION JOB \u2014 maintain YOUR evolving understanding of THIS user.
|
|
3050
3085
|
|
|
@@ -3135,6 +3170,7 @@ STORAGE MECHANICS \u2014 how your memory works (write for the retriever):
|
|
|
3135
3170
|
- 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
3171
|
- Restating a record verbatim OVERWRITES it in place \u2014 updates are restatements of the full corrected statement, not diffs.
|
|
3137
3172
|
- tags are the ONLY topic-filter vocabulary at recall \u2014 reuse stable, lowercase topics (partition lane only).
|
|
3173
|
+
- category is the broad family the fact belongs to (partition lane only): ONE lowercase label per remember call \u2014 games, pets, work, health, finance, contacts \u2026 \u2014 chosen so narrow topics group into families (both the nte and the wuthering waves facts carry category "games"). Always include it; tags stay narrow, category stays broad.
|
|
3138
3174
|
|
|
3139
3175
|
Do NOT store:
|
|
3140
3176
|
- Public facts merely fetched this turn that do not relate to the user (e.g. generic web results).
|
|
@@ -3169,6 +3205,7 @@ YOUR TASK \u2014 decide what is worth remembering:
|
|
|
3169
3205
|
- 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").
|
|
3170
3206
|
- 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.
|
|
3171
3207
|
- 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.
|
|
3208
|
+
- Category: ONE broad lowercase family label for the whole text (e.g. "work", "pets", "games", "health") that groups the narrow tags into one topic family \u2014 always include it when facts are emitted; omit it when nothing durable is found.
|
|
3172
3209
|
- If nothing durable is found, return an empty facts array; tags may still label the topic when useful.
|
|
3173
3210
|
|
|
3174
3211
|
PRIOR MEMORY (when the user message ends with an "ALREADY STORED IN MEMORY" section):
|
|
@@ -3191,7 +3228,7 @@ function buildExtractionCorrectionPrompt(error) {
|
|
|
3191
3228
|
Error: ${error}
|
|
3192
3229
|
|
|
3193
3230
|
Return ONLY a single valid JSON object matching the extraction schema exactly:
|
|
3194
|
-
{"facts": [string, ...], "tags": [string, ...]}
|
|
3231
|
+
{"facts": [string, ...], "tags": [string, ...], "category": "string"}
|
|
3195
3232
|
All object keys must be quoted with double quotes.
|
|
3196
3233
|
Do not add markdown code fences, explanations, or extra text.
|
|
3197
3234
|
|
|
@@ -3226,4 +3263,4 @@ Compose the response from the snippets below. Include every snippet you can subs
|
|
|
3226
3263
|
${parts.join("\n\n")}`;
|
|
3227
3264
|
}
|
|
3228
3265
|
|
|
3229
|
-
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 };
|
|
3266
|
+
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export { D as DEFAULT_VARIANT_ID, F as FormatZodShapeOptions, I as IntentResult, a as IntentSchema, T as TemplateName, f as formatZodShape } from '../intent.schema-
|
|
2
|
+
export { D as DEFAULT_VARIANT_ID, F as FormatZodShapeOptions, I as IntentResult, a as IntentSchema, T as TemplateName, f as formatZodShape } from '../intent.schema-CUQoRJ5x.js';
|
|
3
3
|
|
|
4
4
|
declare const BLOCKED_IMAGE_HOSTS: Set<string>;
|
|
5
5
|
|
|
@@ -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
|
|
|
@@ -264,7 +270,7 @@ declare const memoryProfileResponseSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
264
270
|
path: z.ZodOptional<z.ZodString>;
|
|
265
271
|
}, z.core.$strip>>;
|
|
266
272
|
episode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
|
-
}, z.core.$strip
|
|
273
|
+
}, z.core.$strip>, unknown>;
|
|
268
274
|
type MemoryProfileResponse = z.infer<typeof memoryProfileResponseSchema>;
|
|
269
275
|
declare const INSIGHT_TAGS: string[];
|
|
270
276
|
declare const EPISODE_TAGS: string[];
|
|
@@ -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
|
|
@@ -485,7 +492,14 @@ var ExtractionSchema = z.object({
|
|
|
485
492
|
* 2–6 stable, reusable lowercase topic labels describing the text; the open
|
|
486
493
|
* vocabulary that powers topic-filtered recall.
|
|
487
494
|
*/
|
|
488
|
-
tags: z.array(z.string())
|
|
495
|
+
tags: z.array(z.string()),
|
|
496
|
+
/**
|
|
497
|
+
* One broad lowercase family label for the whole turn-side (e.g. `work`,
|
|
498
|
+
* `pets`, `games`) — groups the narrow tags into one topic family for the
|
|
499
|
+
* constellation's community tier and the relink job's per-category passes.
|
|
500
|
+
* Optional: a turn with nothing durable may omit it.
|
|
501
|
+
*/
|
|
502
|
+
category: z.string().optional()
|
|
489
503
|
});
|
|
490
504
|
var nullishText = z.string().nullish();
|
|
491
505
|
var nullishTopics = z.array(z.string()).nullish();
|
|
@@ -1058,4 +1072,4 @@ var videolistSchema = z.object({
|
|
|
1058
1072
|
internationalCoverage: internationalCoverageSchema.optional()
|
|
1059
1073
|
});
|
|
1060
1074
|
|
|
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 };
|
|
1075
|
+
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.d.ts
CHANGED
|
@@ -417,6 +417,7 @@ declare function createMemoryPartitionRecallTool(deps: MemoryPartitionRecallDeps
|
|
|
417
417
|
|
|
418
418
|
declare const memoryPartitionRememberSchema: z.ZodObject<{
|
|
419
419
|
text: z.ZodString;
|
|
420
|
+
category: z.ZodOptional<z.ZodString>;
|
|
420
421
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
421
422
|
}, z.core.$strip>;
|
|
422
423
|
type MemoryPartitionRememberInput = z.infer<typeof memoryPartitionRememberSchema>;
|
|
@@ -430,6 +431,7 @@ interface MemoryPartitionRememberDeps {
|
|
|
430
431
|
requestId?: string;
|
|
431
432
|
text: string;
|
|
432
433
|
tags?: string[];
|
|
434
|
+
category?: string;
|
|
433
435
|
}) => Promise<string>;
|
|
434
436
|
}
|
|
435
437
|
declare function createMemoryPartitionRememberTool(deps: MemoryPartitionRememberDeps): Tool;
|
package/dist/tools/index.mjs
CHANGED
|
@@ -959,15 +959,18 @@ ${lines.join("\n")}`;
|
|
|
959
959
|
}
|
|
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
|
+
category: z.string().min(1).max(40).optional().describe(
|
|
963
|
+
'One broad lowercase category the fact belongs to, e.g. "games", "pets", "work", "health" \u2014 groups narrow topics into one family. Always include it.'
|
|
964
|
+
),
|
|
962
965
|
tags: z.array(z.string().min(1).max(40)).max(8).optional().describe(
|
|
963
966
|
'Optional topic labels (lowercase, reusable) so future recall can filter by topic, e.g. ["contacts", "sam"].'
|
|
964
967
|
)
|
|
965
968
|
});
|
|
966
969
|
function createMemoryPartitionRememberTool(deps) {
|
|
967
970
|
return tool({
|
|
968
|
-
description:
|
|
971
|
+
description: 'Store into the user\'s fact partition (memory-partition): notable facts about subjects they care about (favorites, interests, projects, followed stocks, people, past topics), preferences and durable details they state, and anything they explicitly ask you to remember. Storing gathered knowledge and noticed preferences is expected \u2014 do not wait for an explicit "remember" instruction. This memory outlives the conversation and is recalled later with memory-partition-recall. STORAGE MECHANICS: each record is embedded as a whole and matched sentence-by-sentence at recall time \u2014 write ONE self-contained statement per call (a single dense sentence is fine, subject up front), restating a record verbatim updates it in place, tags are the recall filter vocabulary (lowercase, reusable), and `category` is one broad family label (games, pets, work, health \u2026) that groups narrow tags into one topic family \u2014 always include both.',
|
|
969
972
|
inputSchema: memoryPartitionRememberSchema,
|
|
970
|
-
execute: async ({ text, tags }) => {
|
|
973
|
+
execute: async ({ text, tags, category }) => {
|
|
971
974
|
try {
|
|
972
975
|
const id = await deps.storeRecord({
|
|
973
976
|
memoryPartition: deps.scope.memoryPartition,
|
|
@@ -975,7 +978,8 @@ function createMemoryPartitionRememberTool(deps) {
|
|
|
975
978
|
conversationId: deps.scope.conversationId,
|
|
976
979
|
requestId: deps.scope.requestId,
|
|
977
980
|
text,
|
|
978
|
-
tags
|
|
981
|
+
tags,
|
|
982
|
+
category
|
|
979
983
|
});
|
|
980
984
|
return { stored: true, id };
|
|
981
985
|
} catch (error) {
|
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.9",
|
|
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.4
|
|
63
|
+
"ai": "^7.0.84",
|
|
64
|
+
"zod": "^4.5.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"ai": {
|