@triplef/agent 0.1.19 → 0.1.21
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 +15 -1
- package/dist/prompts/index.mjs +62 -3
- package/dist/schemas/index.d.ts +16 -1
- package/dist/schemas/index.mjs +20 -1
- package/package.json +2 -2
package/dist/prompts/index.d.ts
CHANGED
|
@@ -65,6 +65,12 @@ declare function buildCognitionProfileSection(profileJson: string): string | und
|
|
|
65
65
|
|
|
66
66
|
declare function buildMemoryProbeSection(points: Array<Pick<MemoryPoint, 'text' | 'role' | 'createdAt'>>): string | undefined;
|
|
67
67
|
|
|
68
|
+
declare function buildSynopsisProbeSection(synopses: Array<{
|
|
69
|
+
title: string;
|
|
70
|
+
summary: string;
|
|
71
|
+
level?: number;
|
|
72
|
+
}>): string | undefined;
|
|
73
|
+
|
|
68
74
|
declare function buildCorrectionPrompt(error: string, template?: string, options?: {
|
|
69
75
|
finalAttempt?: boolean;
|
|
70
76
|
}): string;
|
|
@@ -201,6 +207,14 @@ declare function buildMemoryWritePrompt(params: {
|
|
|
201
207
|
knownTags?: string[];
|
|
202
208
|
}): string;
|
|
203
209
|
|
|
210
|
+
declare const RESEARCH_FRICTION_QUERY_INSTRUCTIONS: string;
|
|
211
|
+
declare function buildResearchFrictionQueryPrompt(contests: Array<{
|
|
212
|
+
id: string;
|
|
213
|
+
statementA: string;
|
|
214
|
+
statementB: string;
|
|
215
|
+
reason?: string;
|
|
216
|
+
}>, maxPayloadChars?: number): string;
|
|
217
|
+
|
|
204
218
|
declare const RESEARCH_TRIAGE_INSTRUCTIONS: string;
|
|
205
219
|
declare function buildResearchTriagePrompt(gaps: Array<{
|
|
206
220
|
url: string;
|
|
@@ -377,4 +391,4 @@ declare const verdictSpineSnippet: TemplateSnippet;
|
|
|
377
391
|
|
|
378
392
|
declare const videoGallerySnippet: TemplateSnippet;
|
|
379
393
|
|
|
380
|
-
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_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, type ResponseLayout, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, type SnippetTemplatePreset, type SourcePolicyConfig, type StructuredPromptTemplate, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, type TemplateSnippet, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildEncyclopediaClassifyPrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, 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 };
|
|
394
|
+
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, type ContentSystemPromptParams, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, FINAL_REMINDER, FRICTION_INSTRUCTIONS, type FrictionFact, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, MEMORY_CLUSTER_INSTRUCTIONS, MEMORY_CONSOLIDATE_INSTRUCTIONS, MEMORY_PROFILE_INSTRUCTIONS, MEMORY_WRITE_INSTRUCTIONS, MERGE_MEDIA_RULES, MERGE_TOPIC_RULE, MULTIMODAL_POLICY, NOISE_RULES, OCR_INSTRUCTIONS, OCR_VERBATIM_INSTRUCTIONS, PRECEDENCE_RULES, PRODUCT_INSTRUCTIONS, RESEARCH_FRICTION_QUERY_INSTRUCTIONS, RESEARCH_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, type ResponseLayout, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, type SnippetTemplatePreset, type SourcePolicyConfig, type StructuredPromptTemplate, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, type TemplateSnippet, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildEncyclopediaClassifyPrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchFrictionQueryPrompt, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, buildSynopsisProbeSection, buildToolExecutePrompt, buildVocabularySection, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatCurrentTimestamp, formatProvenanceLine, formatToolAvailabilityCatalog, formatVariantCatalog, gallerySnippet, getSnippetTemplateKeys, getSnippetTemplateSchema, headerArticleSnippet, headerNewsSnippet, heroMediaSnippet, internationalCoverageSnippet, introductionSnippet, isSnippetTemplate, keyFindingsSnippet, languageCorrectionPrompt, leadSnippet, mergePreset, mergedEvaluationsSnippet, newsKeyFindingsSnippet, newsPreset, quoteSnippet, reasoningSnippet, relatedStoriesSnippet, resolveLanguageName, resolveVariantInstructions, responseLayoutSchema, sourcesSnippet, subjectSchema, subjectsSnippet, summarySnippet, verdictSpineSnippet, videoGallerySnippet };
|
package/dist/prompts/index.mjs
CHANGED
|
@@ -2781,6 +2781,16 @@ function buildMemoryProbeSection(points) {
|
|
|
2781
2781
|
${capped}`;
|
|
2782
2782
|
}
|
|
2783
2783
|
|
|
2784
|
+
// src/prompts/harness/interpret/synopsis-probe-section.prompt.ts
|
|
2785
|
+
var SYNOPSIS_PROBE_CHAR_LIMIT = 2e3;
|
|
2786
|
+
function buildSynopsisProbeSection(synopses) {
|
|
2787
|
+
if (synopses.length === 0) return void 0;
|
|
2788
|
+
const body = synopses.map((synopsis) => `- ${synopsis.title}: ${synopsis.summary}${synopsis.level ? ` (level ${synopsis.level})` : ""}`).join("\n");
|
|
2789
|
+
const capped = body.length > SYNOPSIS_PROBE_CHAR_LIMIT ? `${body.slice(0, SYNOPSIS_PROBE_CHAR_LIMIT)}\u2026` : body;
|
|
2790
|
+
return `MEMORY SYNOPSES \u2014 YOUR community-level summaries of stored knowledge, retrieved for THIS request because the question spans a whole topic rather than one detail. Each synopsis condenses a cluster of records; treat it as orientation for what you know, not as a verbatim source. Use it to decide what to consult deeper (the encyclopedia tools, the memory recall tool), never treat it as the current request itself.
|
|
2791
|
+
${capped}`;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2784
2794
|
// src/prompts/harness/respond/correction-prompt.prompt.ts
|
|
2785
2795
|
var COMPARE_REMINDER = `COMPARE-SPECIFIC REMINDER:
|
|
2786
2796
|
- This is a compare response.
|
|
@@ -3022,8 +3032,8 @@ function buildEncyclopediaClassifyPrompt(knownCategories = [], knownTopics = [])
|
|
|
3022
3032
|
after: `
|
|
3023
3033
|
YOUR TASK \u2014 label one stored source document with its broad category and the topic it is about:
|
|
3024
3034
|
- 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.
|
|
3025
|
-
- category: ONE broad lowercase PLURAL family noun (e.g. "games", "work", "health", "finance") that groups the topic into a family. Never a specific entity, product, company, or title.
|
|
3026
|
-
- topic: the
|
|
3035
|
+
- 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.
|
|
3036
|
+
- topic: the document's MAIN subject entity \u2014 what the whole source is about (e.g. "wuthering waves", "q3 budget", "rust borrow checker"). A short, specific, 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.
|
|
3027
3037
|
- When the document is about a KNOWN TOPIC, output that label VERBATIM \u2014 prefer "neverness to everness" over minting a variant like "nte".
|
|
3028
3038
|
${buildVocabularySection(knownCategories, knownTopics)}
|
|
3029
3039
|
RULES:
|
|
@@ -3398,6 +3408,55 @@ function buildMemoryWritePrompt(params) {
|
|
|
3398
3408
|
].filter(Boolean).join("\n\n");
|
|
3399
3409
|
}
|
|
3400
3410
|
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.';
|
|
3411
|
+
var ResearchFrictionQueryDecisionSchema = z.object({
|
|
3412
|
+
/** The friction id — echoed back so the worker maps the verdict to its candidate. */
|
|
3413
|
+
id: z.string(),
|
|
3414
|
+
/**
|
|
3415
|
+
* True = a public web search can plausibly settle the dispute (a spec, a
|
|
3416
|
+
* date, a version, an event); false = subjective or user-specific, no page
|
|
3417
|
+
* settles it — the friction stays for the reflection cycle.
|
|
3418
|
+
*/
|
|
3419
|
+
checkable: z.boolean(),
|
|
3420
|
+
/**
|
|
3421
|
+
* The single resolution-seeking search query (2–8 words) — present only
|
|
3422
|
+
* when checkable. Worded to fetch decisive evidence, not to restate the
|
|
3423
|
+
* claim.
|
|
3424
|
+
*/
|
|
3425
|
+
query: z.string().min(2).max(200).optional()
|
|
3426
|
+
});
|
|
3427
|
+
var ResearchFrictionQuerySchema = z.object({
|
|
3428
|
+
decisions: z.array(ResearchFrictionQueryDecisionSchema).max(20)
|
|
3429
|
+
});
|
|
3430
|
+
|
|
3431
|
+
// src/prompts/memory/research-friction-query.prompt.ts
|
|
3432
|
+
var RESEARCH_FRICTION_QUERY_INSTRUCTIONS = buildStructuredPrompt(ResearchFrictionQuerySchema, {
|
|
3433
|
+
before: `CONTESTED-MEMORY QUERY FORMULATION \u2014 one purpose: decide which contradictions external evidence can settle, and formulate the search that would fetch it.
|
|
3434
|
+
|
|
3435
|
+
You receive a list of CONTESTS. Each contest is a pair of statements the memory flagged as contradictory, plus a reason describing the conflict. For each contest decide:
|
|
3436
|
+
- checkable=true: the dispute is about publicly verifiable facts (a spec, a version, a date, an event, a property of the world) \u2014 an authoritative source exists that can settle it. Then provide query: ONE resolution-seeking search query (2\u20138 words) that would fetch decisive evidence.
|
|
3437
|
+
- checkable=false: the dispute is subjective or user-specific (taste, personal situations, private arrangements) \u2014 no web page settles it. Omit query.
|
|
3438
|
+
|
|
3439
|
+
Rules:
|
|
3440
|
+
- Word the query to fetch decisive evidence, not just to restate the claim.
|
|
3441
|
+
- At most one query per contest.
|
|
3442
|
+
- Judge checkability strictly: only a genuine public source counts (docs, spec, release notes, reference) \u2014 opinion pieces do not settle a contradiction.
|
|
3443
|
+
- Never invent the answer; you are only formulating the search.
|
|
3444
|
+
|
|
3445
|
+
OUTPUT FORMAT \u2014 output ONLY valid JSON:`,
|
|
3446
|
+
after: "No markdown fences, no explanations."
|
|
3447
|
+
});
|
|
3448
|
+
function buildResearchFrictionQueryPrompt(contests, maxPayloadChars) {
|
|
3449
|
+
const body = JSON.stringify(
|
|
3450
|
+
contests.map((contest) => ({
|
|
3451
|
+
id: contest.id,
|
|
3452
|
+
statementA: contest.statementA,
|
|
3453
|
+
statementB: contest.statementB,
|
|
3454
|
+
reason: contest.reason ?? "(no reason recorded)"
|
|
3455
|
+
}))
|
|
3456
|
+
);
|
|
3457
|
+
return [`CONTESTS:
|
|
3458
|
+
${limitText(body, maxPayloadChars)}`, "Write the decisions JSON object now."].join("\n\n");
|
|
3459
|
+
}
|
|
3401
3460
|
var ResearchTriageDecisionSchema = z.object({
|
|
3402
3461
|
/** The gap's url — echoed back so the worker maps the verdict to its candidate. */
|
|
3403
3462
|
url: z.string(),
|
|
@@ -3590,4 +3649,4 @@ Compose the response from the snippets below. Include every snippet you can subs
|
|
|
3590
3649
|
${parts.join("\n\n")}`;
|
|
3591
3650
|
}
|
|
3592
3651
|
|
|
3593
|
-
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_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildEncyclopediaClassifyPrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, 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 };
|
|
3652
|
+
export { COMMONMARK_FORMAT, COMPARE_INSTRUCTIONS, COMPARE_VISUAL_INSTRUCTIONS, CONVICTION_INSTRUCTIONS, DEFAULT_VARIANT_ID, DESCRIBE_CONCISE_INSTRUCTIONS, DESCRIBE_DETAILED_INSTRUCTIONS, DESCRIBE_INSTRUCTIONS, FINAL_REMINDER, FRICTION_INSTRUCTIONS, HISTORY_URLS_RULES, IMAGELIST_INSTRUCTIONS, IMAGE_TASK_RULE, INTERNATIONAL_COVERAGE_INSTRUCTIONS, ITEM_SHAPES, JSON_RULES, MEDIA_COUNTS, MEDIA_RULES, MEMORY_CLUSTER_INSTRUCTIONS, MEMORY_CONSOLIDATE_INSTRUCTIONS, MEMORY_PROFILE_INSTRUCTIONS, MEMORY_WRITE_INSTRUCTIONS, MERGE_MEDIA_RULES, MERGE_TOPIC_RULE, MULTIMODAL_POLICY, NOISE_RULES, OCR_INSTRUCTIONS, OCR_VERBATIM_INSTRUCTIONS, PRECEDENCE_RULES, PRODUCT_INSTRUCTIONS, RESEARCH_FRICTION_QUERY_INSTRUCTIONS, RESEARCH_TRIAGE_INSTRUCTIONS, RESPONSE_LAYOUTS, SECURITY_RULES, SHOPLIST_INSTRUCTIONS, SNIPPET_TEMPLATE_PRESETS, SOURCE_TRUTH_RULES, SOURCE_VOICE_RULES, STOCKMARKET_ITEM_INSTRUCTIONS, STOCKMARKET_LIST_INSTRUCTIONS, SUMMARY_INSTRUCTIONS, TEMPLATE_VARIANTS, TEXT_CODING_INSTRUCTIONS, TEXT_FAMILIARITY_INSTRUCTIONS, TEXT_INSTRUCTIONS, TOOL_RESULTS_RULES, VIDEOLIST_INSTRUCTIONS, articlePreset, assessmentListsSnippet, authorMetaSnippet, bodyBriefSnippet, bodyExtensiveSnippet, buildBaseSystemPrompt, buildClarificationTranslationSystemPrompt, buildClarificationTranslationUserPrompt, buildClassifyTranscript, buildClusterSummaryPrompt, buildCognitionProfileSection, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildEncyclopediaClassifyPrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, buildResearchFrictionQueryPrompt, buildResearchTriagePrompt, buildSnippetInstruction, buildSourcePolicyPrompt, buildStockmarketNote, buildStructuredJsonPrompt, buildStructuredPrompt, buildSynopsisProbeSection, buildToolExecutePrompt, buildVocabularySection, bylineDatelineSnippet, cardsSnippet, comparisonSchema, comparisonSnippet, composeSnippetKeys, composeSnippetSchema, conclusionSnippet, evaluationPreset, formatCurrentTimestamp, formatProvenanceLine, formatToolAvailabilityCatalog, formatVariantCatalog, gallerySnippet, getSnippetTemplateKeys, getSnippetTemplateSchema, headerArticleSnippet, headerNewsSnippet, heroMediaSnippet, internationalCoverageSnippet, introductionSnippet, isSnippetTemplate, keyFindingsSnippet, languageCorrectionPrompt, leadSnippet, mergePreset, mergedEvaluationsSnippet, newsKeyFindingsSnippet, newsPreset, quoteSnippet, reasoningSnippet, relatedStoriesSnippet, resolveLanguageName, resolveVariantInstructions, responseLayoutSchema, sourcesSnippet, subjectSchema, subjectsSnippet, summarySnippet, verdictSpineSnippet, videoGallerySnippet };
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -272,6 +272,21 @@ interface MergedCognitionProfile {
|
|
|
272
272
|
}
|
|
273
273
|
declare function mergeCognitionProfiles(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): MergedCognitionProfile;
|
|
274
274
|
|
|
275
|
+
declare const ResearchFrictionQueryDecisionSchema: z.ZodObject<{
|
|
276
|
+
id: z.ZodString;
|
|
277
|
+
checkable: z.ZodBoolean;
|
|
278
|
+
query: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
declare const ResearchFrictionQuerySchema: z.ZodObject<{
|
|
281
|
+
decisions: z.ZodArray<z.ZodObject<{
|
|
282
|
+
id: z.ZodString;
|
|
283
|
+
checkable: z.ZodBoolean;
|
|
284
|
+
query: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, z.core.$strip>>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
type ResearchFrictionQueryDecision = z.infer<typeof ResearchFrictionQueryDecisionSchema>;
|
|
288
|
+
type ResearchFrictionQuery = z.infer<typeof ResearchFrictionQuerySchema>;
|
|
289
|
+
|
|
275
290
|
declare const ResearchTriageDecisionSchema: z.ZodObject<{
|
|
276
291
|
url: z.ZodString;
|
|
277
292
|
close: z.ZodBoolean;
|
|
@@ -895,4 +910,4 @@ declare const videolistSchema: z.ZodObject<{
|
|
|
895
910
|
}, z.core.$strip>>>;
|
|
896
911
|
}, z.core.$strip>;
|
|
897
912
|
|
|
898
|
-
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, type ConsolidationVerdict, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, type EncyclopediaClassification, EncyclopediaClassifySchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, MORE_MEDIA_COUNT, type MemoryClusterSummary, MemoryClusterSummarySchema, type MemoryCognitionProfile, type MemoryEnrichment, MemoryEnrichmentSchema, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, type MergedCognitionProfile, NON_PAGE_EXTENSIONS, type ResearchTriage, type ResearchTriageDecision, ResearchTriageDecisionSchema, ResearchTriageSchema, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
|
913
|
+
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, type ConsolidationVerdict, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, type EncyclopediaClassification, EncyclopediaClassifySchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, MORE_MEDIA_COUNT, type MemoryClusterSummary, MemoryClusterSummarySchema, type MemoryCognitionProfile, type MemoryEnrichment, MemoryEnrichmentSchema, type MemoryExtraction, type MemoryProfileInsight, type MemoryProfileResponse, type MergedCognitionProfile, NON_PAGE_EXTENSIONS, type ResearchFrictionQuery, type ResearchFrictionQueryDecision, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, type ResearchTriage, type ResearchTriageDecision, ResearchTriageDecisionSchema, ResearchTriageSchema, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -774,6 +774,25 @@ function mergeCognitionProfiles(current, patch) {
|
|
|
774
774
|
const changed = JSON.stringify(profile) !== JSON.stringify(before);
|
|
775
775
|
return { profile: changed ? profile : void 0, removals };
|
|
776
776
|
}
|
|
777
|
+
var ResearchFrictionQueryDecisionSchema = z.object({
|
|
778
|
+
/** The friction id — echoed back so the worker maps the verdict to its candidate. */
|
|
779
|
+
id: z.string(),
|
|
780
|
+
/**
|
|
781
|
+
* True = a public web search can plausibly settle the dispute (a spec, a
|
|
782
|
+
* date, a version, an event); false = subjective or user-specific, no page
|
|
783
|
+
* settles it — the friction stays for the reflection cycle.
|
|
784
|
+
*/
|
|
785
|
+
checkable: z.boolean(),
|
|
786
|
+
/**
|
|
787
|
+
* The single resolution-seeking search query (2–8 words) — present only
|
|
788
|
+
* when checkable. Worded to fetch decisive evidence, not to restate the
|
|
789
|
+
* claim.
|
|
790
|
+
*/
|
|
791
|
+
query: z.string().min(2).max(200).optional()
|
|
792
|
+
});
|
|
793
|
+
var ResearchFrictionQuerySchema = z.object({
|
|
794
|
+
decisions: z.array(ResearchFrictionQueryDecisionSchema).max(20)
|
|
795
|
+
});
|
|
777
796
|
var ResearchTriageDecisionSchema = z.object({
|
|
778
797
|
/** The gap's url — echoed back so the worker maps the verdict to its candidate. */
|
|
779
798
|
url: z.string(),
|
|
@@ -1171,4 +1190,4 @@ var videolistSchema = z.object({
|
|
|
1171
1190
|
internationalCoverage: internationalCoverageSchema.optional()
|
|
1172
1191
|
});
|
|
1173
1192
|
|
|
1174
|
-
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, DEFAULT_VARIANT_ID, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, ENCYCLOPEDIA_TOOL_NAMES, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, EncyclopediaClassifySchema, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, IMAGE_TASK_TEMPLATES, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, MORE_MEDIA_COUNT, MemoryClusterSummarySchema, MemoryEnrichmentSchema, NON_PAGE_EXTENSIONS, ResearchTriageDecisionSchema, ResearchTriageSchema, TOOL_DESCRIPTIONS, TOOL_NAMES, VARIANT_NAMES, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isImageTaskTemplate, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
|
1193
|
+
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, BROWSER_TOOL_NAMES, COGNITION_LIMIT_DEFAULT, COGNITION_LIMIT_MAX, COGNITION_LIMIT_MIN, COGNITION_PURGE_BATCH, CONVICTION_TAGS, CONVICTION_TEXT_LIMIT, ConsolidationVerdictSchema, DEFAULT_MEDIA_COUNT, DEFAULT_VARIANT_ID, EMBEDDABLE_VIDEO_PROVIDER_CLAUSE, EMBEDDABLE_VIDEO_PROVIDER_LABELS, ENCYCLOPEDIA_TOOL_NAMES, EPISODE_PROBE_LIMIT_DEFAULT, EPISODE_PROBE_LIMIT_MIN, EPISODE_RECENCY_MIDPOINT_DEFAULT, EPISODE_RECENCY_MIDPOINT_MAX, EPISODE_RECENCY_MIDPOINT_MIN, EPISODE_RECENCY_SCALE_SECONDS_DEFAULT, EPISODE_RECENCY_SCALE_SECONDS_MAX, EPISODE_RECENCY_SCALE_SECONDS_MIN, EPISODE_RECENCY_WEIGHT_DEFAULT, EPISODE_RECENCY_WEIGHT_MAX, EPISODE_RECENCY_WEIGHT_MIN, EPISODE_SCORE_THRESHOLD_DEFAULT, EPISODE_SCORE_THRESHOLD_MAX, EPISODE_SCORE_THRESHOLD_MIN, EPISODE_TAGS, EPISODE_TEXT_LIMIT, EncyclopediaClassifySchema, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, HERO_VIDEO_TITLE_ISSUE, IMAGE_TASK_TEMPLATES, INSIGHTS_MAX_PER_TURN, INSIGHT_TAGS, INSIGHT_TEXT_LIMIT, IntentSchema, MEMORY_TOOL_NAMES, MORE_MEDIA_COUNT, MemoryClusterSummarySchema, MemoryEnrichmentSchema, NON_PAGE_EXTENSIONS, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, ResearchTriageDecisionSchema, ResearchTriageSchema, TOOL_DESCRIPTIONS, TOOL_NAMES, VARIANT_NAMES, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAllFieldsNullWipe, isImageTaskTemplate, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@triplef/agent",
|
|
3
3
|
"description": "tripleF (3F) agent domain — structured-output schemas, prompt builders, and model tools shared across the apps.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.21",
|
|
5
5
|
"packageManager": "pnpm@11.25.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"turndown": "^7.2.4"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"ai": "^7.0.
|
|
63
|
+
"ai": "^7.0.92",
|
|
64
64
|
"zod": "^4.5.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|