@triplef/agent 0.1.16 → 0.1.18

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
1
  import { z } from 'zod';
2
- export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, 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 '../intent.schema-Bp3p7h7P.js';
2
+ export { B as BROWSER_TOOL_NAMES, D as DEFAULT_VARIANT_ID, 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-DTl2uBDp.js';
3
3
 
4
4
  declare const BLOCKED_IMAGE_HOSTS: Set<string>;
5
5
 
@@ -22,6 +22,9 @@ interface EncyclopediaSourceDocument {
22
22
  url?: string;
23
23
  title?: string;
24
24
  content: string;
25
+ mimeType?: string;
26
+ sizeBytes?: number;
27
+ originalHash?: string;
25
28
  }
26
29
  interface EncyclopediaSelectedChunk {
27
30
  url?: string;
@@ -110,8 +113,48 @@ declare const MemoryEnrichmentSchema: z.ZodObject<{
110
113
  }, z.core.$strip>;
111
114
  type MemoryEnrichment = z.infer<typeof MemoryEnrichmentSchema>;
112
115
 
116
+ declare const FACT_KINDS: readonly ["preference", "decision", "state", "contact", "project", "possession", "relationship", "fact"];
117
+ declare const FACT_STABILITIES: readonly ["durable", "volatile"];
118
+ declare const ExtractedFactSchema: z.ZodObject<{
119
+ text: z.ZodString;
120
+ subject: z.ZodOptional<z.ZodString>;
121
+ category: z.ZodOptional<z.ZodString>;
122
+ kind: z.ZodEnum<{
123
+ preference: "preference";
124
+ decision: "decision";
125
+ state: "state";
126
+ contact: "contact";
127
+ project: "project";
128
+ possession: "possession";
129
+ relationship: "relationship";
130
+ fact: "fact";
131
+ }>;
132
+ stability: z.ZodEnum<{
133
+ durable: "durable";
134
+ volatile: "volatile";
135
+ }>;
136
+ }, z.core.$strip>;
137
+ type ExtractedFact = z.infer<typeof ExtractedFactSchema>;
113
138
  declare const ExtractionSchema: z.ZodObject<{
114
- facts: z.ZodArray<z.ZodString>;
139
+ facts: z.ZodArray<z.ZodObject<{
140
+ text: z.ZodString;
141
+ subject: z.ZodOptional<z.ZodString>;
142
+ category: z.ZodOptional<z.ZodString>;
143
+ kind: z.ZodEnum<{
144
+ preference: "preference";
145
+ decision: "decision";
146
+ state: "state";
147
+ contact: "contact";
148
+ project: "project";
149
+ possession: "possession";
150
+ relationship: "relationship";
151
+ fact: "fact";
152
+ }>;
153
+ stability: z.ZodEnum<{
154
+ durable: "durable";
155
+ volatile: "volatile";
156
+ }>;
157
+ }, z.core.$strip>>;
115
158
  tags: z.ZodArray<z.ZodString>;
116
159
  category: z.ZodOptional<z.ZodString>;
117
160
  }, z.core.$strip>;
@@ -146,11 +189,6 @@ declare const memoryCognitionProfileSchema: z.ZodObject<{
146
189
  corrections: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
147
190
  }, z.core.$strip>;
148
191
  type MemoryCognitionProfile = z.infer<typeof memoryCognitionProfileSchema>;
149
- interface MergedCognitionProfile {
150
- profile?: MemoryCognitionProfile;
151
- removals: string[];
152
- }
153
- declare function mergeCognitionProfiles(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): MergedCognitionProfile;
154
192
  declare function isAllFieldsNullWipe(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): boolean;
155
193
  declare function parseStoredProfile(text: string | undefined): MemoryCognitionProfile;
156
194
  declare const memoryProfileInsightSchema: z.ZodObject<{
@@ -227,6 +265,12 @@ declare function clampEpisodeRecencyMidpoint(value: number): number;
227
265
  declare function clampEpisodeProbeLimit(value: number): number;
228
266
  declare function clampEpisodeScoreThreshold(value: number): number;
229
267
 
268
+ interface MergedCognitionProfile {
269
+ profile?: MemoryCognitionProfile;
270
+ removals: string[];
271
+ }
272
+ declare function mergeCognitionProfiles(current: MemoryCognitionProfile | undefined, patch: MemoryCognitionProfile): MergedCognitionProfile;
273
+
230
274
  declare const cardSchema: z.ZodObject<{
231
275
  url: z.ZodString;
232
276
  title: z.ZodOptional<z.ZodString>;
@@ -833,4 +877,4 @@ declare const videolistSchema: z.ZodObject<{
833
877
  }, z.core.$strip>>>;
834
878
  }, z.core.$strip>;
835
879
 
836
- 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, ExtractionSchema, 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, NON_PAGE_EXTENSIONS, 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 };
880
+ 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, 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 };
@@ -513,13 +513,48 @@ var MemoryEnrichmentSchema = z.object({
513
513
  */
514
514
  tags: z.array(z.string())
515
515
  });
516
+ var FACT_KINDS = [
517
+ "preference",
518
+ "decision",
519
+ "state",
520
+ "contact",
521
+ "project",
522
+ "possession",
523
+ "relationship",
524
+ "fact"
525
+ ];
526
+ var FACT_STABILITIES = ["durable", "volatile"];
527
+ var ExtractedFactSchema = z.object({
528
+ /**
529
+ * The self-contained durable statement — third person, subject up front,
530
+ * no "this"/"that" references.
531
+ */
532
+ text: z.string(),
533
+ /**
534
+ * The lowercase entity the fact is about (default `user`; a person,
535
+ * product, or project name). Maintenance adjudication only ever compares
536
+ * facts about the SAME subject.
537
+ */
538
+ subject: z.string().optional(),
539
+ /**
540
+ * One broad lowercase PLURAL family label for THIS fact (e.g. `stocks`,
541
+ * `pets`, `games`) — inherits the turn-side category when omitted. Never
542
+ * a specific entity, product, company, or game title.
543
+ */
544
+ category: z.string().optional(),
545
+ /** What kind of durable thing this is (see FACT_KINDS). */
546
+ kind: z.enum(FACT_KINDS),
547
+ /** Whether a newer statement is expected to replace this one (see FACT_STABILITIES). */
548
+ stability: z.enum(FACT_STABILITIES)
549
+ });
516
550
  var ExtractionSchema = z.object({
517
551
  /**
518
552
  * Durable, self-contained facts worth remembering in a later, unrelated
519
- * conversation (preferences, decisions, contact details, project facts).
520
- * Empty when nothing in the text is worth remembering.
553
+ * conversation (preferences, decisions, contact details, project facts),
554
+ * each carrying its maintenance metadata (subject, category, kind,
555
+ * stability). Empty when nothing in the text is worth remembering.
521
556
  */
522
- facts: z.array(z.string()),
557
+ facts: z.array(ExtractedFactSchema),
523
558
  /**
524
559
  * 2–6 stable, reusable lowercase topic labels describing the text; the open
525
560
  * vocabulary that powers topic-filtered recall. Tags are NARROW and
@@ -531,9 +566,10 @@ var ExtractionSchema = z.object({
531
566
  * One broad lowercase PLURAL family label for the whole turn-side (e.g.
532
567
  * `stocks`, `pets`, `games`) — groups the narrow tags into one topic family
533
568
  * for the constellation's community tier and the relink job's per-category
534
- * passes. Never a specific entity, product, company, or game title: `amd`
535
- * belongs under `stocks`; `stellar blade` belongs under `games`. Optional:
536
- * a turn with nothing durable may omit it.
569
+ * passes, and backstops facts that omit their own `category`. Never a
570
+ * specific entity, product, company, or game title: `amd` belongs under
571
+ * `stocks`; `stellar blade` belongs under `games`. Optional: a turn with
572
+ * nothing durable may omit it.
537
573
  */
538
574
  category: z.string().optional()
539
575
  });
@@ -593,44 +629,6 @@ var memoryCognitionProfileSchema = z.object({
593
629
  */
594
630
  corrections: z.record(z.string(), z.string()).nullish()
595
631
  });
596
- function normalizeCognitionProfile(profile) {
597
- if (!profile) return void 0;
598
- const cleaned = {};
599
- for (const [key, value] of Object.entries(profile)) {
600
- const kept = cleanProfileValue(value);
601
- if (kept !== void 0) cleaned[key] = kept;
602
- }
603
- return Object.keys(cleaned).length > 0 ? cleaned : void 0;
604
- }
605
- function cleanProfileValue(value) {
606
- if (value === null || value === void 0) return void 0;
607
- if (typeof value === "string") return value.trim() || void 0;
608
- if (Array.isArray(value)) {
609
- const items = value.map((entry) => typeof entry === "string" ? entry.trim() : entry).filter(Boolean);
610
- return items.length > 0 ? items : void 0;
611
- }
612
- if (typeof value !== "object") return void 0;
613
- const inner = Object.fromEntries(
614
- Object.entries(value).map(([k, v]) => [k, cleanProfileValue(v)]).filter(([, v]) => v !== void 0)
615
- );
616
- return Object.keys(inner).length > 0 ? inner : void 0;
617
- }
618
- function mergeCognitionProfiles(current, patch) {
619
- const patchRecord = patch;
620
- const removals = Object.keys(patchRecord).filter(
621
- (key) => patchRecord[key] === null || patchRecord[key] === void 0
622
- );
623
- const base = current ?? {};
624
- const merged = merge(
625
- omit(base, removals),
626
- omit(patch, removals),
627
- true
628
- );
629
- const profile = normalizeCognitionProfile(merged) ?? {};
630
- const before = normalizeCognitionProfile(base) ?? {};
631
- const changed = JSON.stringify(profile) !== JSON.stringify(before);
632
- return { profile: changed ? profile : void 0, removals };
633
- }
634
632
  function isAllFieldsNullWipe(current, patch) {
635
633
  if (!current) return false;
636
634
  const currentKeys = Object.keys(current);
@@ -737,6 +735,44 @@ function clampEpisodeScoreThreshold(value) {
737
735
  if (!Number.isFinite(value)) return EPISODE_SCORE_THRESHOLD_DEFAULT;
738
736
  return Math.min(EPISODE_SCORE_THRESHOLD_MAX, Math.max(EPISODE_SCORE_THRESHOLD_MIN, value));
739
737
  }
738
+ function normalizeCognitionProfile(profile) {
739
+ if (!profile) return void 0;
740
+ const cleaned = {};
741
+ for (const [key, value] of Object.entries(profile)) {
742
+ const kept = cleanProfileValue(value);
743
+ if (kept !== void 0) cleaned[key] = kept;
744
+ }
745
+ return Object.keys(cleaned).length > 0 ? cleaned : void 0;
746
+ }
747
+ function cleanProfileValue(value) {
748
+ if (value === null || value === void 0) return void 0;
749
+ if (typeof value === "string") return value.trim() || void 0;
750
+ if (Array.isArray(value)) {
751
+ const items = value.map((entry) => typeof entry === "string" ? entry.trim() : entry).filter(Boolean);
752
+ return items.length > 0 ? items : void 0;
753
+ }
754
+ if (typeof value !== "object") return void 0;
755
+ const inner = Object.fromEntries(
756
+ Object.entries(value).map(([k, v]) => [k, cleanProfileValue(v)]).filter(([, v]) => v !== void 0)
757
+ );
758
+ return Object.keys(inner).length > 0 ? inner : void 0;
759
+ }
760
+ function mergeCognitionProfiles(current, patch) {
761
+ const patchRecord = patch;
762
+ const removals = Object.keys(patchRecord).filter(
763
+ (key) => patchRecord[key] === null || patchRecord[key] === void 0
764
+ );
765
+ const base = current ?? {};
766
+ const merged = merge(
767
+ omit(base, removals),
768
+ omit(patch, removals),
769
+ true
770
+ );
771
+ const profile = normalizeCognitionProfile(merged) ?? {};
772
+ const before = normalizeCognitionProfile(base) ?? {};
773
+ const changed = JSON.stringify(profile) !== JSON.stringify(before);
774
+ return { profile: changed ? profile : void 0, removals };
775
+ }
740
776
  var cardSchema = z.object(
741
777
  {
742
778
  url: safeUrl({ message: "cards entries must have a valid url" }),
@@ -1117,4 +1153,4 @@ var videolistSchema = z.object({
1117
1153
  internationalCoverage: internationalCoverageSchema.optional()
1118
1154
  });
1119
1155
 
1120
- 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, 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, ExtractionSchema, 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, 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 };
1156
+ 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, 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, 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.16",
4
+ "version": "0.1.18",
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.90",
63
+ "ai": "^7.0.91",
64
64
  "zod": "^4.5.4"
65
65
  },
66
66
  "peerDependenciesMeta": {
@@ -98,11 +98,6 @@ type ProviderConfig = {
98
98
  };
99
99
  };
100
100
 
101
- interface FormatZodShapeOptions {
102
- overrides?: Record<string, string>;
103
- }
104
- declare function formatZodShape(schema: z.ZodType, options?: FormatZodShapeOptions): string;
105
-
106
101
  declare const DEFAULT_VARIANT_ID = "default";
107
102
  declare const TEMPLATES: readonly ["article", "news", "describe", "compare", "ocr", "summary", "evaluation", "product", "shoplist", "imagelist", "videolist", "stockmarketitem", "stockmarketlist", "merge", "text"];
108
103
  type TemplateName = (typeof TEMPLATES)[number];
@@ -111,21 +106,21 @@ type ImageTaskTemplate = (typeof IMAGE_TASK_TEMPLATES)[number];
111
106
  declare function isImageTaskTemplate(template: string): template is ImageTaskTemplate;
112
107
  declare const IntentSchema: z.ZodObject<{
113
108
  template: z.ZodEnum<{
109
+ text: "text";
110
+ summary: "summary";
114
111
  article: "article";
112
+ evaluation: "evaluation";
113
+ merge: "merge";
115
114
  news: "news";
115
+ stockmarketitem: "stockmarketitem";
116
+ stockmarketlist: "stockmarketlist";
116
117
  describe: "describe";
117
118
  compare: "compare";
118
119
  ocr: "ocr";
119
- summary: "summary";
120
- evaluation: "evaluation";
121
120
  product: "product";
122
121
  shoplist: "shoplist";
123
122
  imagelist: "imagelist";
124
123
  videolist: "videolist";
125
- stockmarketitem: "stockmarketitem";
126
- stockmarketlist: "stockmarketlist";
127
- merge: "merge";
128
- text: "text";
129
124
  }>;
130
125
  prompt: z.ZodDefault<z.ZodString>;
131
126
  tools: z.ZodArray<z.ZodEnum<{
@@ -200,4 +195,9 @@ declare const IntentSchema: z.ZodObject<{
200
195
  }, z.core.$strip>;
201
196
  type IntentResult = z.infer<typeof IntentSchema>;
202
197
 
198
+ interface FormatZodShapeOptions {
199
+ overrides?: Record<string, string>;
200
+ }
201
+ declare function formatZodShape(schema: z.ZodType, options?: FormatZodShapeOptions): string;
202
+
203
203
  export { BROWSER_TOOL_NAMES as B, DEFAULT_VARIANT_ID as D, 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 };