@triplef/agent 0.1.20 → 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.
@@ -1,5 +1,5 @@
1
- import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.helper-C2PB6Sb2.js';
2
- export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.helper-C2PB6Sb2.js';
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';
@@ -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}`;
@@ -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 narrow subject the document 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.
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:
@@ -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-C2PB6Sb2.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-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.20",
4
+ "version": "0.1.21",
5
5
  "packageManager": "pnpm@11.25.0",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -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<{