@triplef/agent 0.1.20 → 0.1.22
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.helper-
|
|
2
|
-
export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.helper-
|
|
1
|
+
import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.helper-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';
|
package/dist/prompts/index.mjs
CHANGED
|
@@ -2392,7 +2392,7 @@ without needing an explicit "remember" instruction. Two lanes, never confused:
|
|
|
2392
2392
|
- EXPLICIT INSTRUCTION: when the user explicitly asks to remember, track, follow, or learn something (however phrased, in any language), include the enabled memory-partition-remember tool and act on it.
|
|
2393
2393
|
- UPDATE-LOOP: when memory-partition-recall shows the user already has facts on the subject, the remember call must UPDATE or EXTEND them, never duplicate or contradict. The turn pipeline also extracts notable facts automatically, so the remember tool is the explicit agentic write, not the only write path.
|
|
2394
2394
|
- FORGET A FACT: when the user asks to forget, delete, or stop remembering a specific statement (however phrased, in any language), include the enabled memory-partition-recall AND memory-partition-delete tools \u2014 recall surfaces the verbatim stored statement, delete removes exactly that record. Deletion is exact: the model recalls first, then deletes the verbatim text (records have no ids).
|
|
2395
|
-
- FORGET UNDERSTANDING: when the user asks to forget what you have LEARNED about them (your understanding, not a specific fact), include the enabled memory-cognition-forget tool \u2014 it wipes your whole cognition space (the structured profile AND every derived insight), the AI's own accumulated model of the user. Full fact-store wipes stay a settings (
|
|
2395
|
+
- FORGET UNDERSTANDING: when the user asks to forget what you have LEARNED about them (your understanding, not a specific fact), include the enabled memory-cognition-forget tool \u2014 it wipes your whole cognition space (the structured profile AND every derived insight), the AI's own accumulated model of the user. Full fact-store wipes stay a settings (settings) action, never a tool call.
|
|
2396
2396
|
- DISCLOSE: when the user asks what you remember, know, or have learned about them ("what do you know about me?", however phrased, any language), answer from memory and your cognition (the structured profile block and any probed insights already in context) \u2014 template "text", prompt variant "familiarity", NO web tools (the subject is private, not public). Disclose plainly, quote the stored statements and profile fields, and offer correction or deletion.
|
|
2397
2397
|
- When a request needs both memory and public sources, include memory-partition-recall AND the enabled *WebSearch tools \u2014 never replace memory-partition-recall with web search. Memory is the user's own statements; web is public sources; the answer keeps the two distinct.
|
|
2398
2398
|
- A READ question about prior conversation is a CONTINUATION: carry the referenced entities into contextSummary verbatim so the recall query stays concrete.`;
|
|
@@ -2785,9 +2785,7 @@ ${capped}`;
|
|
|
2785
2785
|
var SYNOPSIS_PROBE_CHAR_LIMIT = 2e3;
|
|
2786
2786
|
function buildSynopsisProbeSection(synopses) {
|
|
2787
2787
|
if (synopses.length === 0) return void 0;
|
|
2788
|
-
const body = synopses.map(
|
|
2789
|
-
(synopsis) => `- ${synopsis.title}: ${synopsis.summary}${synopsis.level ? ` (level ${synopsis.level})` : ""}`
|
|
2790
|
-
).join("\n");
|
|
2788
|
+
const body = synopses.map((synopsis) => `- ${synopsis.title}: ${synopsis.summary}${synopsis.level ? ` (level ${synopsis.level})` : ""}`).join("\n");
|
|
2791
2789
|
const capped = body.length > SYNOPSIS_PROBE_CHAR_LIMIT ? `${body.slice(0, SYNOPSIS_PROBE_CHAR_LIMIT)}\u2026` : body;
|
|
2792
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.
|
|
2793
2791
|
${capped}`;
|
|
@@ -2905,7 +2903,7 @@ RULES:
|
|
|
2905
2903
|
- clarificationQuestion: MUST be in the language identified by the "language" field.
|
|
2906
2904
|
- reasoning: MUST be in the language identified by the "language" field.
|
|
2907
2905
|
- If the request is ambiguous set needsClarification=true and provide a concise question in the language identified by the "language" field. The question must offer the most likely interpretations as options.
|
|
2908
|
-
- imageCount: set only when the user explicitly requests a number of images, or asks for more images without a number (then ${MORE_MEDIA_COUNT}); otherwise omit \u2014 the system uses the configured reference-pool default (
|
|
2906
|
+
- imageCount: set only when the user explicitly requests a number of images, or asks for more images without a number (then ${MORE_MEDIA_COUNT}); otherwise omit \u2014 the system uses the configured reference-pool default (Settings Sources) for describe/compare/ocr and ${DEFAULT_MEDIA_COUNT} for other templates.
|
|
2909
2907
|
- videoCount: set only when the user explicitly requests a number of videos, or asks for more videos without a number (then ${MORE_MEDIA_COUNT}); otherwise omit \u2014 the system defaults to ${DEFAULT_MEDIA_COUNT}.
|
|
2910
2908
|
- plan.images.resize should be true when images are present, unless the user explicitly asks for full resolution.
|
|
2911
2909
|
- plan.images.variants should only include variants that would materially improve the analysis. Leave empty if the original is sufficient.
|
|
@@ -2925,7 +2923,7 @@ Return ONLY a single valid JSON object matching the intent schema exactly.
|
|
|
2925
2923
|
All object keys must be quoted with double quotes.
|
|
2926
2924
|
Do not add markdown code fences, explanations, or extra text.
|
|
2927
2925
|
|
|
2928
|
-
- plan: must be an object
|
|
2926
|
+
- plan: must be an object \u2014 never null, never a string. Omit it when unused.
|
|
2929
2927
|
- Omit any other optional field instead of setting it to null.
|
|
2930
2928
|
|
|
2931
2929
|
FINAL REMINDER:
|
|
@@ -3034,8 +3032,8 @@ function buildEncyclopediaClassifyPrompt(knownCategories = [], knownTopics = [])
|
|
|
3034
3032
|
after: `
|
|
3035
3033
|
YOUR TASK \u2014 label one stored source document with its broad category and the topic it is about:
|
|
3036
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.
|
|
3037
|
-
- 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.
|
|
3038
|
-
- 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.
|
|
3039
3037
|
- When the document is about a KNOWN TOPIC, output that label VERBATIM \u2014 prefer "neverness to everness" over minting a variant like "nte".
|
|
3040
3038
|
${buildVocabularySection(knownCategories, knownTopics)}
|
|
3041
3039
|
RULES:
|
|
@@ -3616,9 +3614,9 @@ function buildExtractionCorrectionPrompt(error) {
|
|
|
3616
3614
|
Error: ${error}
|
|
3617
3615
|
|
|
3618
3616
|
Return ONLY a single valid JSON object matching the extraction schema exactly:
|
|
3619
|
-
{
|
|
3617
|
+
${formatZodShape(ExtractionSchema)}
|
|
3620
3618
|
All object keys must be quoted with double quotes. "subject" and the per-fact "category" are optional; "kind" and "stability" are required on every fact.
|
|
3621
|
-
Do not add markdown code fences, explanations, or extra text.
|
|
3619
|
+
Do not add markdown code fences, explanations, placeholders, or extra text.
|
|
3622
3620
|
|
|
3623
3621
|
FINAL REMINDER:
|
|
3624
3622
|
- Return ONLY a single valid JSON object. No markdown code fences, no explanations, no extra text.`;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export { E as EncyclopediaDocumentInput, a as EncyclopediaDocumentResult, b as EncyclopediaSearchHit, c as EncyclopediaSearchInput } from '../encyclopedia-search.model-oFW8_rUT.js';
|
|
3
|
-
export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, E as ENCYCLOPEDIA_TOOL_NAMES, F as FormatZodShapeOptions, a as IMAGE_TASK_TEMPLATES, b as ImageTaskTemplate, I as IntentResult, c as IntentSchema, M as MEMORY_TOOL_NAMES, P as ProviderConfig, d as TOOL_DESCRIPTIONS, e as TOOL_NAMES, T as TemplateName, f as ToolName, g as VARIANT_NAMES, V as VariantName, h as formatZodShape, i as isImageTaskTemplate } from '../format-zod-shape.helper-
|
|
3
|
+
export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, E as ENCYCLOPEDIA_TOOL_NAMES, F as FormatZodShapeOptions, a as IMAGE_TASK_TEMPLATES, b as ImageTaskTemplate, I as IntentResult, c as IntentSchema, M as MEMORY_TOOL_NAMES, P as ProviderConfig, d as TOOL_DESCRIPTIONS, e as TOOL_NAMES, T as TemplateName, f as ToolName, g as VARIANT_NAMES, V as VariantName, h as formatZodShape, i as isImageTaskTemplate } from '../format-zod-shape.helper-BviIexpu.js';
|
|
4
4
|
|
|
5
5
|
declare const BLOCKED_IMAGE_HOSTS: Set<string>;
|
|
6
6
|
|
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.22",
|
|
5
5
|
"packageManager": "pnpm@11.25.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
package/dist/{format-zod-shape.helper-C2PB6Sb2.d.ts → format-zod-shape.helper-BviIexpu.d.ts}
RENAMED
|
@@ -107,21 +107,21 @@ type ImageTaskTemplate = (typeof IMAGE_TASK_TEMPLATES)[number];
|
|
|
107
107
|
declare function isImageTaskTemplate(template: string): template is ImageTaskTemplate;
|
|
108
108
|
declare const IntentSchema: z.ZodObject<{
|
|
109
109
|
template: z.ZodEnum<{
|
|
110
|
+
text: "text";
|
|
111
|
+
summary: "summary";
|
|
110
112
|
article: "article";
|
|
113
|
+
evaluation: "evaluation";
|
|
114
|
+
merge: "merge";
|
|
111
115
|
news: "news";
|
|
116
|
+
stockmarketitem: "stockmarketitem";
|
|
117
|
+
stockmarketlist: "stockmarketlist";
|
|
112
118
|
describe: "describe";
|
|
113
119
|
compare: "compare";
|
|
114
120
|
ocr: "ocr";
|
|
115
|
-
summary: "summary";
|
|
116
|
-
evaluation: "evaluation";
|
|
117
121
|
product: "product";
|
|
118
122
|
shoplist: "shoplist";
|
|
119
123
|
imagelist: "imagelist";
|
|
120
124
|
videolist: "videolist";
|
|
121
|
-
stockmarketitem: "stockmarketitem";
|
|
122
|
-
stockmarketlist: "stockmarketlist";
|
|
123
|
-
merge: "merge";
|
|
124
|
-
text: "text";
|
|
125
125
|
}>;
|
|
126
126
|
prompt: z.ZodDefault<z.ZodString>;
|
|
127
127
|
tools: z.ZodArray<z.ZodEnum<{
|