@triplef/agent 0.1.17 → 0.1.19
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/encyclopedia-search.model-oFW8_rUT.d.ts +35 -0
- package/dist/{intent.schema-Bp3p7h7P.d.ts → format-zod-shape.helper-BviIexpu.d.ts} +13 -12
- package/dist/prompts/index.d.ts +12 -3
- package/dist/prompts/index.mjs +666 -1022
- package/dist/schemas/index.d.ts +29 -7
- package/dist/schemas/index.mjs +57 -39
- package/dist/tools/index.d.ts +38 -1
- package/dist/tools/index.mjs +65 -8
- package/package.json +2 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface EncyclopediaDocumentInput {
|
|
2
|
+
url: string;
|
|
3
|
+
offset?: number;
|
|
4
|
+
maxChars?: number;
|
|
5
|
+
}
|
|
6
|
+
interface EncyclopediaDocumentResult {
|
|
7
|
+
url: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
domain: string;
|
|
10
|
+
totalChunks: number;
|
|
11
|
+
fromChunk: number;
|
|
12
|
+
toChunk: number;
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
content: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface EncyclopediaSearchInput {
|
|
18
|
+
query: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
domain?: string;
|
|
21
|
+
limit?: number;
|
|
22
|
+
}
|
|
23
|
+
interface EncyclopediaSearchHit {
|
|
24
|
+
url: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
domain: string;
|
|
27
|
+
content: string;
|
|
28
|
+
score: number;
|
|
29
|
+
chunkIndex: number;
|
|
30
|
+
chunkCount: number;
|
|
31
|
+
sourceType: 'content' | 'result';
|
|
32
|
+
fetchedAt: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type { EncyclopediaDocumentInput as E, EncyclopediaDocumentResult as a, EncyclopediaSearchHit as b, EncyclopediaSearchInput as c };
|
|
@@ -5,6 +5,7 @@ type VariantName = (typeof VARIANT_NAMES)[number];
|
|
|
5
5
|
declare const TOOL_DESCRIPTIONS: Record<string, string>;
|
|
6
6
|
declare const BROWSER_TOOL_NAMES: readonly ["browser_navigate", "browser_navigate_back", "browser_snapshot", "browser_click", "browser_type", "browser_fill_form", "browser_select_option", "browser_press_key", "browser_wait_for", "browser_take_screenshot", "browser_tabs", "browser_console_messages", "browser_network_requests", "browser_verify_element_visible", "browser_verify_text_visible"];
|
|
7
7
|
declare const MEMORY_TOOL_NAMES: readonly ["memory-partition-remember", "memory-partition-recall", "memory-partition-delete", "memory-cognition-remember", "memory-cognition-forget"];
|
|
8
|
+
declare const ENCYCLOPEDIA_TOOL_NAMES: readonly ["encyclopedia-search", "encyclopedia-read"];
|
|
8
9
|
declare const TOOL_NAMES: readonly ["webFetch", "brightDataWebSearch", "brightDataImageSearch", "brightDataNewsSearch", "brightDataPlacesSearch", "brightDataShoppingSearch", "brightDataVideoSearch", "brightDataWebpageScrape", "serperWebSearch", "serperImageSearch", "serperNewsSearch", "serperPlacesSearch", "serperShoppingSearch", "serperBusinessReviewsSearch", "serperVideoSearch", "serperWebpageScrape", "youtubeVideoSearch", "eodhdSearch", "eodhdQuote", "eodhdHistory", "eodhdTechnical", "eodhdIntraday", "eodhdNews", "eodhdFundamentals", "requestGrayscale", "requestDenoised", "requestSharpened", "requestClahe", "memory-partition-remember", "memory-partition-recall", "memory-partition-delete", "memory-cognition-remember", "memory-cognition-forget", "browser_navigate", "browser_navigate_back", "browser_snapshot", "browser_click", "browser_type", "browser_fill_form", "browser_select_option", "browser_press_key", "browser_wait_for", "browser_take_screenshot", "browser_tabs", "browser_console_messages", "browser_network_requests", "browser_verify_element_visible", "browser_verify_text_visible"];
|
|
9
10
|
type ToolName = (typeof TOOL_NAMES)[number];
|
|
10
11
|
type ProviderConfig = {
|
|
@@ -98,11 +99,6 @@ type ProviderConfig = {
|
|
|
98
99
|
};
|
|
99
100
|
};
|
|
100
101
|
|
|
101
|
-
interface FormatZodShapeOptions {
|
|
102
|
-
overrides?: Record<string, string>;
|
|
103
|
-
}
|
|
104
|
-
declare function formatZodShape(schema: z.ZodType, options?: FormatZodShapeOptions): string;
|
|
105
|
-
|
|
106
102
|
declare const DEFAULT_VARIANT_ID = "default";
|
|
107
103
|
declare const TEMPLATES: readonly ["article", "news", "describe", "compare", "ocr", "summary", "evaluation", "product", "shoplist", "imagelist", "videolist", "stockmarketitem", "stockmarketlist", "merge", "text"];
|
|
108
104
|
type TemplateName = (typeof TEMPLATES)[number];
|
|
@@ -111,21 +107,21 @@ type ImageTaskTemplate = (typeof IMAGE_TASK_TEMPLATES)[number];
|
|
|
111
107
|
declare function isImageTaskTemplate(template: string): template is ImageTaskTemplate;
|
|
112
108
|
declare const IntentSchema: z.ZodObject<{
|
|
113
109
|
template: z.ZodEnum<{
|
|
110
|
+
text: "text";
|
|
111
|
+
summary: "summary";
|
|
114
112
|
article: "article";
|
|
113
|
+
evaluation: "evaluation";
|
|
114
|
+
merge: "merge";
|
|
115
115
|
news: "news";
|
|
116
|
+
stockmarketitem: "stockmarketitem";
|
|
117
|
+
stockmarketlist: "stockmarketlist";
|
|
116
118
|
describe: "describe";
|
|
117
119
|
compare: "compare";
|
|
118
120
|
ocr: "ocr";
|
|
119
|
-
summary: "summary";
|
|
120
|
-
evaluation: "evaluation";
|
|
121
121
|
product: "product";
|
|
122
122
|
shoplist: "shoplist";
|
|
123
123
|
imagelist: "imagelist";
|
|
124
124
|
videolist: "videolist";
|
|
125
|
-
stockmarketitem: "stockmarketitem";
|
|
126
|
-
stockmarketlist: "stockmarketlist";
|
|
127
|
-
merge: "merge";
|
|
128
|
-
text: "text";
|
|
129
125
|
}>;
|
|
130
126
|
prompt: z.ZodDefault<z.ZodString>;
|
|
131
127
|
tools: z.ZodArray<z.ZodEnum<{
|
|
@@ -200,4 +196,9 @@ declare const IntentSchema: z.ZodObject<{
|
|
|
200
196
|
}, z.core.$strip>;
|
|
201
197
|
type IntentResult = z.infer<typeof IntentSchema>;
|
|
202
198
|
|
|
203
|
-
|
|
199
|
+
interface FormatZodShapeOptions {
|
|
200
|
+
overrides?: Record<string, string>;
|
|
201
|
+
}
|
|
202
|
+
declare function formatZodShape(schema: z.ZodType, options?: FormatZodShapeOptions): string;
|
|
203
|
+
|
|
204
|
+
export { BROWSER_TOOL_NAMES as B, DEFAULT_VARIANT_ID as D, ENCYCLOPEDIA_TOOL_NAMES as E, type FormatZodShapeOptions as F, type IntentResult as I, MEMORY_TOOL_NAMES as M, type ProviderConfig as P, type TemplateName as T, type VariantName as V, IMAGE_TASK_TEMPLATES as a, type ImageTaskTemplate as b, IntentSchema as c, TOOL_DESCRIPTIONS as d, TOOL_NAMES as e, type ToolName as f, VARIANT_NAMES as g, formatZodShape as h, isImageTaskTemplate as i };
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../
|
|
2
|
-
export { D as DEFAULT_VARIANT_ID } from '../
|
|
1
|
+
import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.helper-BviIexpu.js';
|
|
2
|
+
export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.helper-BviIexpu.js';
|
|
3
3
|
import { M as MemoryPoint } from '../memory-point.model-C4wvvjAY.js';
|
|
4
4
|
import * as zod from 'zod';
|
|
5
5
|
import { z, ZodTypeAny, ZodType } from 'zod';
|
|
@@ -61,6 +61,8 @@ declare function buildClassifyTranscript(messages: Array<{
|
|
|
61
61
|
content: string;
|
|
62
62
|
}>): string | undefined;
|
|
63
63
|
|
|
64
|
+
declare function buildCognitionProfileSection(profileJson: string): string | undefined;
|
|
65
|
+
|
|
64
66
|
declare function buildMemoryProbeSection(points: Array<Pick<MemoryPoint, 'text' | 'role' | 'createdAt'>>): string | undefined;
|
|
65
67
|
|
|
66
68
|
declare function buildCorrectionPrompt(error: string, template?: string, options?: {
|
|
@@ -199,6 +201,13 @@ declare function buildMemoryWritePrompt(params: {
|
|
|
199
201
|
knownTags?: string[];
|
|
200
202
|
}): string;
|
|
201
203
|
|
|
204
|
+
declare const RESEARCH_TRIAGE_INSTRUCTIONS: string;
|
|
205
|
+
declare function buildResearchTriagePrompt(gaps: Array<{
|
|
206
|
+
url: string;
|
|
207
|
+
title?: string;
|
|
208
|
+
snippet: string;
|
|
209
|
+
}>, maxPayloadChars?: number): string;
|
|
210
|
+
|
|
202
211
|
declare function buildExtractionPrompt(knownCategories?: readonly string[], knownTags?: readonly string[]): string;
|
|
203
212
|
declare function buildExtractionCorrectionPrompt(error: string): string;
|
|
204
213
|
|
|
@@ -368,4 +377,4 @@ declare const verdictSpineSnippet: TemplateSnippet;
|
|
|
368
377
|
|
|
369
378
|
declare const videoGallerySnippet: TemplateSnippet;
|
|
370
379
|
|
|
371
|
-
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, 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, buildConsolidatePrompt, buildContentSystemPrompt, buildContextSummarySection, buildConvictionSynthesisPrompt, buildCorrectionPrompt, buildEncyclopediaClassifyPrompt, buildEnrichPrompt, buildExecuteLanguageInstruction, buildExtractionCorrectionPrompt, buildExtractionPrompt, buildFrictionPrompt, buildImageExecutePrompt, buildIntentCorrectionPrompt, buildIntentSelectionPrompt, buildLanguageRule, buildLayoutInstruction, buildLocalizationRule, buildMemoryProbeSection, buildMemoryProfilePrompt, buildMemoryWritePrompt, buildMergeDirective, buildMissingToolsPrompt, buildOutputContract, 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 };
|
|
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 };
|