@triplef/agent 1.0.9 → 2.0.2
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/LICENSE +106 -0
- package/README.md +27 -19
- package/dist/{format-zod-shape.types-BByqTKpk.d.ts → format-zod-shape.types-CyafXeK5.d.ts} +2 -18
- package/dist/prompts/index.d.ts +2 -2
- package/dist/prompts/index.mjs +3 -36
- package/dist/schemas/index.d.ts +3 -94
- package/dist/schemas/index.mjs +5 -40
- package/package.json +6 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# PolyForm Strict License 1.0.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eugen Hildt
|
|
4
|
+
|
|
5
|
+
https://polyformproject.org/licenses/strict/1.0.0
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree
|
|
10
|
+
to them as both strict obligations and conditions to all
|
|
11
|
+
your licenses.
|
|
12
|
+
|
|
13
|
+
## Copyright License
|
|
14
|
+
|
|
15
|
+
The licensor grants you a copyright license for the software
|
|
16
|
+
to do everything you might do with the software that would
|
|
17
|
+
otherwise infringe the licensor's copyright in it for any
|
|
18
|
+
permitted purpose, other than distributing the software or
|
|
19
|
+
making changes or new works based on the software.
|
|
20
|
+
|
|
21
|
+
## Patent License
|
|
22
|
+
|
|
23
|
+
The licensor grants you a patent license for the software that
|
|
24
|
+
covers patent claims the licensor can license, or becomes able
|
|
25
|
+
to license, that you would infringe by using the software.
|
|
26
|
+
|
|
27
|
+
## Noncommercial Purposes
|
|
28
|
+
|
|
29
|
+
Any noncommercial purpose is a permitted purpose.
|
|
30
|
+
|
|
31
|
+
## Personal Uses
|
|
32
|
+
|
|
33
|
+
Personal use for research, experiment, and testing for
|
|
34
|
+
the benefit of public knowledge, personal study, private
|
|
35
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
36
|
+
observance, without any anticipated commercial application,
|
|
37
|
+
is use for a permitted purpose.
|
|
38
|
+
|
|
39
|
+
## Noncommercial Organizations
|
|
40
|
+
|
|
41
|
+
Use by any charitable organization, educational institution,
|
|
42
|
+
public research organization, public safety or health
|
|
43
|
+
organization, environmental protection organization,
|
|
44
|
+
or government institution is use for a permitted purpose
|
|
45
|
+
regardless of the source of funding or obligations resulting
|
|
46
|
+
from the funding.
|
|
47
|
+
|
|
48
|
+
## Fair Use
|
|
49
|
+
|
|
50
|
+
You may have "fair use" rights for the software under the
|
|
51
|
+
law. These terms do not limit them.
|
|
52
|
+
|
|
53
|
+
## No Other Rights
|
|
54
|
+
|
|
55
|
+
These terms do not allow you to sublicense or transfer any of
|
|
56
|
+
your licenses to anyone else, or prevent the licensor from
|
|
57
|
+
granting licenses to anyone else. These terms do not imply
|
|
58
|
+
any other licenses.
|
|
59
|
+
|
|
60
|
+
## Patent Defense
|
|
61
|
+
|
|
62
|
+
If you make any written claim that the software infringes or
|
|
63
|
+
contributes to infringement of any patent, your patent license
|
|
64
|
+
for the software granted under these terms ends immediately. If
|
|
65
|
+
your company makes such a claim, your patent license ends
|
|
66
|
+
immediately for work on behalf of your company.
|
|
67
|
+
|
|
68
|
+
## Violations
|
|
69
|
+
|
|
70
|
+
The first time you are notified in writing that you have
|
|
71
|
+
violated any of these terms, or done anything with the software
|
|
72
|
+
not covered by your licenses, your licenses can nonetheless
|
|
73
|
+
continue if you come into full compliance with these terms,
|
|
74
|
+
and take practical steps to correct past violations, within
|
|
75
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
76
|
+
end immediately.
|
|
77
|
+
|
|
78
|
+
## No Liability
|
|
79
|
+
|
|
80
|
+
***As far as the law allows, the software comes as is, without
|
|
81
|
+
any warranty or condition, and the licensor will not be liable
|
|
82
|
+
to you for any damages arising out of these terms or the use
|
|
83
|
+
or nature of the software, under any kind of legal claim.***
|
|
84
|
+
|
|
85
|
+
## Definitions
|
|
86
|
+
|
|
87
|
+
The **licensor** is the individual or entity offering these
|
|
88
|
+
terms, and the **software** is the software the licensor makes
|
|
89
|
+
available under these terms.
|
|
90
|
+
|
|
91
|
+
**You** refers to the individual or entity agreeing to these
|
|
92
|
+
terms.
|
|
93
|
+
|
|
94
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
95
|
+
or other kind of organization that you work for, plus all
|
|
96
|
+
organizations that have control over, are under the control of,
|
|
97
|
+
or are under common control with that organization. **Control**
|
|
98
|
+
means ownership of substantially all the assets of an entity,
|
|
99
|
+
or the power to direct its management and policies by vote,
|
|
100
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
101
|
+
|
|
102
|
+
**Your licenses** are all the licenses granted to you for the
|
|
103
|
+
software under these terms.
|
|
104
|
+
|
|
105
|
+
**Use** means anything you do with the software requiring one
|
|
106
|
+
of your licenses.
|
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
14
14
|
<!-- DEPBADGE:START -->
|
|
15
15
|
<div align="center">
|
|
16
16
|
|
|
17
|
+
|
|
18
|
+
|
|
17
19
|
# StatusBadges
|
|
18
20
|
|
|
19
21
|

|
|
@@ -26,12 +28,14 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
26
28
|
|
|
27
29
|
<div align="center">
|
|
28
30
|
|
|
31
|
+
|
|
32
|
+
|
|
29
33
|
# Dependencies
|
|
30
34
|
|
|
31
35
|
[](https://github.com/mozilla/readability)
|
|
32
|
-
[](https://github.com/ehildt/tripleF)
|
|
37
|
+
[](https://github.com/WebReflection/linkedom)
|
|
38
|
+
[](https://github.com/mixmark-io/turndown)
|
|
35
39
|
|
|
36
40
|
</div>
|
|
37
41
|
|
|
@@ -39,33 +43,35 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
39
43
|
|
|
40
44
|
<div align="center">
|
|
41
45
|
|
|
46
|
+
|
|
47
|
+
|
|
42
48
|
# DevDependencies
|
|
43
49
|
|
|
44
|
-

|
|
45
51
|

|
|
46
52
|

|
|
47
|
-

|
|
48
54
|

|
|
49
|
-

|
|
50
56
|

|
|
51
|
-

|
|
58
|
+

|
|
53
59
|

|
|
54
|
-

|
|
55
61
|

|
|
56
|
-

|
|
63
|
+

|
|
58
64
|

|
|
59
65
|

|
|
60
|
-

|
|
67
|
+

|
|
68
|
+

|
|
69
|
+

|
|
64
70
|

|
|
65
71
|

|
|
66
72
|

|
|
67
|
-

|
|
74
|
+

|
|
69
75
|
|
|
70
76
|
</div>
|
|
71
77
|
|
|
@@ -73,10 +79,12 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
73
79
|
|
|
74
80
|
<div align="center">
|
|
75
81
|
|
|
82
|
+
|
|
83
|
+
|
|
76
84
|
# PeerDependencies
|
|
77
85
|
|
|
78
|
-
[](https://github.com/vercel/ai)
|
|
87
|
+
[](https://github.com/colinhacks/zod)
|
|
80
88
|
|
|
81
89
|
</div>
|
|
82
90
|
<!-- DEPBADGE:END -->
|
|
@@ -3,10 +3,9 @@ import { z } from 'zod';
|
|
|
3
3
|
declare const VARIANT_NAMES: readonly ["grayscale", "denoised", "sharpened", "clahe"];
|
|
4
4
|
type VariantName = (typeof VARIANT_NAMES)[number];
|
|
5
5
|
declare const TOOL_DESCRIPTIONS: Record<string, string>;
|
|
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
6
|
declare const MEMORY_TOOL_NAMES: readonly ["memory-partition-recall", "memory-partition-delete", "memory-cognition-delete", "memory-cognition-forget"];
|
|
8
7
|
declare const ENCYCLOPEDIA_TOOL_NAMES: readonly ["encyclopedia-search", "encyclopedia-read"];
|
|
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-recall", "memory-partition-delete", "memory-cognition-forget"
|
|
8
|
+
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-recall", "memory-partition-delete", "memory-cognition-forget"];
|
|
10
9
|
type ToolName = (typeof TOOL_NAMES)[number];
|
|
11
10
|
|
|
12
11
|
declare const DEFAULT_VARIANT_ID = "default";
|
|
@@ -59,21 +58,6 @@ declare const IntentSchema: z.ZodObject<{
|
|
|
59
58
|
eodhdNews: "eodhdNews";
|
|
60
59
|
eodhdFundamentals: "eodhdFundamentals";
|
|
61
60
|
webFetch: "webFetch";
|
|
62
|
-
browser_navigate: "browser_navigate";
|
|
63
|
-
browser_navigate_back: "browser_navigate_back";
|
|
64
|
-
browser_snapshot: "browser_snapshot";
|
|
65
|
-
browser_click: "browser_click";
|
|
66
|
-
browser_type: "browser_type";
|
|
67
|
-
browser_fill_form: "browser_fill_form";
|
|
68
|
-
browser_select_option: "browser_select_option";
|
|
69
|
-
browser_press_key: "browser_press_key";
|
|
70
|
-
browser_wait_for: "browser_wait_for";
|
|
71
|
-
browser_take_screenshot: "browser_take_screenshot";
|
|
72
|
-
browser_tabs: "browser_tabs";
|
|
73
|
-
browser_console_messages: "browser_console_messages";
|
|
74
|
-
browser_network_requests: "browser_network_requests";
|
|
75
|
-
browser_verify_element_visible: "browser_verify_element_visible";
|
|
76
|
-
browser_verify_text_visible: "browser_verify_text_visible";
|
|
77
61
|
requestGrayscale: "requestGrayscale";
|
|
78
62
|
requestDenoised: "requestDenoised";
|
|
79
63
|
requestSharpened: "requestSharpened";
|
|
@@ -110,4 +94,4 @@ interface FormatZodShapeOptions {
|
|
|
110
94
|
overrides?: Record<string, string>;
|
|
111
95
|
}
|
|
112
96
|
|
|
113
|
-
export {
|
|
97
|
+
export { DEFAULT_VARIANT_ID as D, ENCYCLOPEDIA_TOOL_NAMES as E, type FormatZodShapeOptions as F, type IntentResult as I, MEMORY_TOOL_NAMES as M, 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, 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 '../format-zod-shape.types-
|
|
2
|
-
export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.types-
|
|
1
|
+
import { V as VariantName, I as IntentResult, T as TemplateName, F as FormatZodShapeOptions } from '../format-zod-shape.types-CyafXeK5.js';
|
|
2
|
+
export { D as DEFAULT_VARIANT_ID } from '../format-zod-shape.types-CyafXeK5.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
|
@@ -321,10 +321,10 @@ function isAbsoluteHttpUrl(value) {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
// src/schemas/helpers/url-trust/safe-media-url.helper.ts
|
|
324
|
-
var
|
|
324
|
+
var OBJECT_STORAGE_URL_PATTERN = /^\/api\/v1\/object-storage\/[A-Za-z0-9_-]+\/[A-Za-z0-9_-]+\/[A-Za-z0-9]+$/;
|
|
325
325
|
function safeMediaUrl(message = "must be a safe media URL") {
|
|
326
326
|
const text = typeof message === "string" ? message : message.message;
|
|
327
|
-
return z.string().refine((value) =>
|
|
327
|
+
return z.string().refine((value) => OBJECT_STORAGE_URL_PATTERN.test(value) || isAbsoluteHttpUrl(value), { message: text });
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
// src/schemas/helpers/url-trust/safe-media-url-or-empty.helper.ts
|
|
@@ -1325,21 +1325,6 @@ var TOOL_DESCRIPTIONS = {
|
|
|
1325
1325
|
eodhdNews: "Fetch recent financial news for an EODHD ticker \u2014 headlines, links, sources, publish dates. Use to ground a stock-market answer in what is happening around a company.",
|
|
1326
1326
|
eodhdFundamentals: "Fetch company fundamentals for an EODHD ticker \u2014 general info, valuation, and key financial highlights (sector, market cap, P/E, revenue, margins).",
|
|
1327
1327
|
webFetch: "Fetch the full content of a specific URL (e.g. a search result page) as clean Markdown. The top 3 web/news search results are fetched automatically when no fetch tool is selected \u2014 use this only for a specific page beyond those, when full source text is needed beyond the snippets.",
|
|
1328
|
-
browser_navigate: "Control a real browser: navigate to a URL. Use for interactive browsing \u2014 JS-heavy pages, content behind clicks, tabs, scrolling, or forms \u2014 that static search/fetch cannot reach. Follow up with browser_snapshot to read the page before acting on it.",
|
|
1329
|
-
browser_navigate_back: "Go back to the previous page in the browser history.",
|
|
1330
|
-
browser_snapshot: "Read the current browser page as an accessibility snapshot (structured text with element refs). The primary way to see page content and obtain the refs that browser_click/browser_type need.",
|
|
1331
|
-
browser_click: "Click an element in the browser, referenced by a ref from browser_snapshot.",
|
|
1332
|
-
browser_type: "Type text into an editable browser element, referenced by a ref from browser_snapshot, optionally submitting with Enter.",
|
|
1333
|
-
browser_fill_form: "Fill multiple form fields in the browser in one call.",
|
|
1334
|
-
browser_select_option: "Select an option in a dropdown in the browser.",
|
|
1335
|
-
browser_press_key: "Press a keyboard key in the browser (Enter, Tab, arrows).",
|
|
1336
|
-
browser_wait_for: "Wait for text to appear or disappear, or for a time period, in the browser.",
|
|
1337
|
-
browser_take_screenshot: "Take a screenshot of the current browser page or a specific element.",
|
|
1338
|
-
browser_tabs: "List, create, close, or switch browser tabs.",
|
|
1339
|
-
browser_console_messages: "Get console messages from the browser. Use to diagnose JavaScript errors on a page (e.g. when testing a web app).",
|
|
1340
|
-
browser_network_requests: "List network requests the browser made since page load. Use to diagnose failed or slow requests (e.g. when testing a web app).",
|
|
1341
|
-
browser_verify_element_visible: "Assert that an element is visible on the current browser page.",
|
|
1342
|
-
browser_verify_text_visible: "Assert that text is visible on the current browser page.",
|
|
1343
1328
|
requestGrayscale: "Request a grayscale version of the images. Use when color noise or color information is irrelevant, for example when reading text or analyzing shapes.",
|
|
1344
1329
|
requestDenoised: "Request a denoised (blurred) version of the images. Use when the original has noise, grain, or artifacts that hide details.",
|
|
1345
1330
|
requestSharpened: "Request a sharpened version of the images. Use when edges or fine details are blurry.",
|
|
@@ -1349,23 +1334,6 @@ var TOOL_DESCRIPTIONS = {
|
|
|
1349
1334
|
"memory-cognition-delete": 'Delete one targeted piece of your cognition space (memory-cognition): a verbatim stored insight (quoted from your cognition context) and/or one standing profile topic by its path ("likes.jazz"). The per-item forget for subjective user data; memory-cognition-forget is the whole-space wipe.',
|
|
1350
1335
|
"memory-cognition-forget": "Wipe your entire cognition space (memory-cognition) of the user \u2014 the structured profile AND every derived insight \u2014 only when the user asks you to forget your learned understanding of them or to start over. Fact records in the partition are untouched."
|
|
1351
1336
|
};
|
|
1352
|
-
var BROWSER_TOOL_NAMES = [
|
|
1353
|
-
"browser_navigate",
|
|
1354
|
-
"browser_navigate_back",
|
|
1355
|
-
"browser_snapshot",
|
|
1356
|
-
"browser_click",
|
|
1357
|
-
"browser_type",
|
|
1358
|
-
"browser_fill_form",
|
|
1359
|
-
"browser_select_option",
|
|
1360
|
-
"browser_press_key",
|
|
1361
|
-
"browser_wait_for",
|
|
1362
|
-
"browser_take_screenshot",
|
|
1363
|
-
"browser_tabs",
|
|
1364
|
-
"browser_console_messages",
|
|
1365
|
-
"browser_network_requests",
|
|
1366
|
-
"browser_verify_element_visible",
|
|
1367
|
-
"browser_verify_text_visible"
|
|
1368
|
-
];
|
|
1369
1337
|
var TOOL_NAMES = [
|
|
1370
1338
|
"webFetch",
|
|
1371
1339
|
"brightDataWebSearch",
|
|
@@ -1397,8 +1365,7 @@ var TOOL_NAMES = [
|
|
|
1397
1365
|
"requestClahe",
|
|
1398
1366
|
"memory-partition-recall",
|
|
1399
1367
|
"memory-partition-delete",
|
|
1400
|
-
"memory-cognition-forget"
|
|
1401
|
-
...BROWSER_TOOL_NAMES
|
|
1368
|
+
"memory-cognition-forget"
|
|
1402
1369
|
];
|
|
1403
1370
|
|
|
1404
1371
|
// src/prompts/harness/helpers/tool-catalog.helper.ts
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import { F as FormatZodShapeOptions } from '../format-zod-shape.types-
|
|
4
|
-
export {
|
|
3
|
+
import { F as FormatZodShapeOptions } from '../format-zod-shape.types-CyafXeK5.js';
|
|
4
|
+
export { D as DEFAULT_VARIANT_ID, E as ENCYCLOPEDIA_TOOL_NAMES, a as IMAGE_TASK_TEMPLATES, b as ImageTaskTemplate, I as IntentResult, c as IntentSchema, M as MEMORY_TOOL_NAMES, d as TOOL_DESCRIPTIONS, e as TOOL_NAMES, T as TemplateName, f as ToolName, g as VARIANT_NAMES, V as VariantName, i as isImageTaskTemplate } from '../format-zod-shape.types-CyafXeK5.js';
|
|
5
5
|
|
|
6
6
|
declare const BLOCKED_IMAGE_HOSTS: Set<string>;
|
|
7
7
|
|
|
@@ -64,97 +64,6 @@ interface EncyclopediaSelectResult {
|
|
|
64
64
|
|
|
65
65
|
declare function categorizeTools(toolNames: readonly string[]): Record<string, string[]>;
|
|
66
66
|
|
|
67
|
-
type ProviderConfig = {
|
|
68
|
-
serper: {
|
|
69
|
-
enabled: boolean;
|
|
70
|
-
apiKey?: string;
|
|
71
|
-
web: {
|
|
72
|
-
enabled: boolean;
|
|
73
|
-
};
|
|
74
|
-
images: {
|
|
75
|
-
enabled: boolean;
|
|
76
|
-
};
|
|
77
|
-
news: {
|
|
78
|
-
enabled: boolean;
|
|
79
|
-
};
|
|
80
|
-
places: {
|
|
81
|
-
enabled: boolean;
|
|
82
|
-
};
|
|
83
|
-
shopping: {
|
|
84
|
-
enabled: boolean;
|
|
85
|
-
};
|
|
86
|
-
reviews: {
|
|
87
|
-
enabled: boolean;
|
|
88
|
-
};
|
|
89
|
-
videos: {
|
|
90
|
-
enabled: boolean;
|
|
91
|
-
};
|
|
92
|
-
scrape: {
|
|
93
|
-
enabled: boolean;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
youtube: {
|
|
97
|
-
enabled: boolean;
|
|
98
|
-
apiKey?: string;
|
|
99
|
-
videos: {
|
|
100
|
-
enabled: boolean;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
brightData: {
|
|
104
|
-
enabled: boolean;
|
|
105
|
-
apiKey?: string;
|
|
106
|
-
web: {
|
|
107
|
-
enabled: boolean;
|
|
108
|
-
};
|
|
109
|
-
images: {
|
|
110
|
-
enabled: boolean;
|
|
111
|
-
};
|
|
112
|
-
news: {
|
|
113
|
-
enabled: boolean;
|
|
114
|
-
};
|
|
115
|
-
places: {
|
|
116
|
-
enabled: boolean;
|
|
117
|
-
};
|
|
118
|
-
shopping: {
|
|
119
|
-
enabled: boolean;
|
|
120
|
-
};
|
|
121
|
-
videos: {
|
|
122
|
-
enabled: boolean;
|
|
123
|
-
};
|
|
124
|
-
scrape: {
|
|
125
|
-
enabled: boolean;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
eodhd: {
|
|
129
|
-
enabled: boolean;
|
|
130
|
-
apiKey?: string;
|
|
131
|
-
search: {
|
|
132
|
-
enabled: boolean;
|
|
133
|
-
};
|
|
134
|
-
quote: {
|
|
135
|
-
enabled: boolean;
|
|
136
|
-
};
|
|
137
|
-
history: {
|
|
138
|
-
enabled: boolean;
|
|
139
|
-
};
|
|
140
|
-
technical: {
|
|
141
|
-
enabled: boolean;
|
|
142
|
-
};
|
|
143
|
-
intraday: {
|
|
144
|
-
enabled: boolean;
|
|
145
|
-
};
|
|
146
|
-
news: {
|
|
147
|
-
enabled: boolean;
|
|
148
|
-
};
|
|
149
|
-
fundamentals: {
|
|
150
|
-
enabled: boolean;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
playwright: {
|
|
154
|
-
enabled: boolean;
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
|
|
158
67
|
declare function hasBlockedImageHost(url: string): boolean;
|
|
159
68
|
|
|
160
69
|
declare function isAbsoluteHttpUrl(value: string): boolean;
|
|
@@ -1062,4 +971,4 @@ declare const videolistSchema: z.ZodObject<{
|
|
|
1062
971
|
}, z.core.$strip>>>;
|
|
1063
972
|
}, z.core.$strip>;
|
|
1064
973
|
|
|
1065
|
-
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 EncyclopediaIngestTriage, type EncyclopediaIngestTriageDecision, EncyclopediaIngestTriageDecisionSchema, EncyclopediaIngestTriageSchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, FormatZodShapeOptions, 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
|
|
974
|
+
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 EncyclopediaIngestTriage, type EncyclopediaIngestTriageDecision, EncyclopediaIngestTriageDecisionSchema, EncyclopediaIngestTriageSchema, type EncyclopediaSearchResult, type EncyclopediaSelectInput, type EncyclopediaSelectResult, type EncyclopediaSelectedChunk, type EncyclopediaSourceDocument, type ExtractedFact, ExtractedFactSchema, ExtractionSchema, FACT_KINDS, FACT_STABILITIES, FormatZodShapeOptions, 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 PruneProfileTopicOutcome, type ResearchFrictionQuery, type ResearchFrictionQueryDecision, ResearchFrictionQueryDecisionSchema, ResearchFrictionQuerySchema, type ResearchTriage, type ResearchTriageDecision, ResearchTriageDecisionSchema, ResearchTriageSchema, TAXONOMY_ICON_ALLOWLIST, type TaxonomyIconName, type TaxonomyPairVerdict, TaxonomyPairVerdictSchema, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAbsoluteHttpUrl, isAllFieldsNullWipe, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -110,13 +110,11 @@ function categorizeTools(toolNames) {
|
|
|
110
110
|
newsSearch: [],
|
|
111
111
|
videoSearch: [],
|
|
112
112
|
pageFetch: [],
|
|
113
|
-
browser: [],
|
|
114
113
|
imageVariants: [],
|
|
115
114
|
specialized: []
|
|
116
115
|
};
|
|
117
116
|
for (const t of toolNames) {
|
|
118
|
-
if (t.
|
|
119
|
-
else if (t.endsWith("ImageSearch")) cats.imageSearch.push(t);
|
|
117
|
+
if (t.endsWith("ImageSearch")) cats.imageSearch.push(t);
|
|
120
118
|
else if (t.endsWith("NewsSearch")) cats.newsSearch.push(t);
|
|
121
119
|
else if (t.endsWith("VideoSearch")) cats.videoSearch.push(t);
|
|
122
120
|
else if (t.includes("Fetch") || t.includes("fetch") || t.includes("Scrape")) cats.pageFetch.push(t);
|
|
@@ -153,21 +151,6 @@ var TOOL_DESCRIPTIONS = {
|
|
|
153
151
|
eodhdNews: "Fetch recent financial news for an EODHD ticker \u2014 headlines, links, sources, publish dates. Use to ground a stock-market answer in what is happening around a company.",
|
|
154
152
|
eodhdFundamentals: "Fetch company fundamentals for an EODHD ticker \u2014 general info, valuation, and key financial highlights (sector, market cap, P/E, revenue, margins).",
|
|
155
153
|
webFetch: "Fetch the full content of a specific URL (e.g. a search result page) as clean Markdown. The top 3 web/news search results are fetched automatically when no fetch tool is selected \u2014 use this only for a specific page beyond those, when full source text is needed beyond the snippets.",
|
|
156
|
-
browser_navigate: "Control a real browser: navigate to a URL. Use for interactive browsing \u2014 JS-heavy pages, content behind clicks, tabs, scrolling, or forms \u2014 that static search/fetch cannot reach. Follow up with browser_snapshot to read the page before acting on it.",
|
|
157
|
-
browser_navigate_back: "Go back to the previous page in the browser history.",
|
|
158
|
-
browser_snapshot: "Read the current browser page as an accessibility snapshot (structured text with element refs). The primary way to see page content and obtain the refs that browser_click/browser_type need.",
|
|
159
|
-
browser_click: "Click an element in the browser, referenced by a ref from browser_snapshot.",
|
|
160
|
-
browser_type: "Type text into an editable browser element, referenced by a ref from browser_snapshot, optionally submitting with Enter.",
|
|
161
|
-
browser_fill_form: "Fill multiple form fields in the browser in one call.",
|
|
162
|
-
browser_select_option: "Select an option in a dropdown in the browser.",
|
|
163
|
-
browser_press_key: "Press a keyboard key in the browser (Enter, Tab, arrows).",
|
|
164
|
-
browser_wait_for: "Wait for text to appear or disappear, or for a time period, in the browser.",
|
|
165
|
-
browser_take_screenshot: "Take a screenshot of the current browser page or a specific element.",
|
|
166
|
-
browser_tabs: "List, create, close, or switch browser tabs.",
|
|
167
|
-
browser_console_messages: "Get console messages from the browser. Use to diagnose JavaScript errors on a page (e.g. when testing a web app).",
|
|
168
|
-
browser_network_requests: "List network requests the browser made since page load. Use to diagnose failed or slow requests (e.g. when testing a web app).",
|
|
169
|
-
browser_verify_element_visible: "Assert that an element is visible on the current browser page.",
|
|
170
|
-
browser_verify_text_visible: "Assert that text is visible on the current browser page.",
|
|
171
154
|
requestGrayscale: "Request a grayscale version of the images. Use when color noise or color information is irrelevant, for example when reading text or analyzing shapes.",
|
|
172
155
|
requestDenoised: "Request a denoised (blurred) version of the images. Use when the original has noise, grain, or artifacts that hide details.",
|
|
173
156
|
requestSharpened: "Request a sharpened version of the images. Use when edges or fine details are blurry.",
|
|
@@ -177,23 +160,6 @@ var TOOL_DESCRIPTIONS = {
|
|
|
177
160
|
"memory-cognition-delete": 'Delete one targeted piece of your cognition space (memory-cognition): a verbatim stored insight (quoted from your cognition context) and/or one standing profile topic by its path ("likes.jazz"). The per-item forget for subjective user data; memory-cognition-forget is the whole-space wipe.',
|
|
178
161
|
"memory-cognition-forget": "Wipe your entire cognition space (memory-cognition) of the user \u2014 the structured profile AND every derived insight \u2014 only when the user asks you to forget your learned understanding of them or to start over. Fact records in the partition are untouched."
|
|
179
162
|
};
|
|
180
|
-
var BROWSER_TOOL_NAMES = [
|
|
181
|
-
"browser_navigate",
|
|
182
|
-
"browser_navigate_back",
|
|
183
|
-
"browser_snapshot",
|
|
184
|
-
"browser_click",
|
|
185
|
-
"browser_type",
|
|
186
|
-
"browser_fill_form",
|
|
187
|
-
"browser_select_option",
|
|
188
|
-
"browser_press_key",
|
|
189
|
-
"browser_wait_for",
|
|
190
|
-
"browser_take_screenshot",
|
|
191
|
-
"browser_tabs",
|
|
192
|
-
"browser_console_messages",
|
|
193
|
-
"browser_network_requests",
|
|
194
|
-
"browser_verify_element_visible",
|
|
195
|
-
"browser_verify_text_visible"
|
|
196
|
-
];
|
|
197
163
|
var MEMORY_TOOL_NAMES = [
|
|
198
164
|
"memory-partition-recall",
|
|
199
165
|
"memory-partition-delete",
|
|
@@ -232,8 +198,7 @@ var TOOL_NAMES = [
|
|
|
232
198
|
"requestClahe",
|
|
233
199
|
"memory-partition-recall",
|
|
234
200
|
"memory-partition-delete",
|
|
235
|
-
"memory-cognition-forget"
|
|
236
|
-
...BROWSER_TOOL_NAMES
|
|
201
|
+
"memory-cognition-forget"
|
|
237
202
|
];
|
|
238
203
|
|
|
239
204
|
// src/schemas/helpers/url-trust/has-blocked-image-host.helper.ts
|
|
@@ -374,10 +339,10 @@ function isTrustedUrl(url, options = {}) {
|
|
|
374
339
|
}
|
|
375
340
|
return true;
|
|
376
341
|
}
|
|
377
|
-
var
|
|
342
|
+
var OBJECT_STORAGE_URL_PATTERN = /^\/api\/v1\/object-storage\/[A-Za-z0-9_-]+\/[A-Za-z0-9_-]+\/[A-Za-z0-9]+$/;
|
|
378
343
|
function safeMediaUrl(message = "must be a safe media URL") {
|
|
379
344
|
const text = typeof message === "string" ? message : message.message;
|
|
380
|
-
return z.string().refine((value) =>
|
|
345
|
+
return z.string().refine((value) => OBJECT_STORAGE_URL_PATTERN.test(value) || isAbsoluteHttpUrl(value), { message: text });
|
|
381
346
|
}
|
|
382
347
|
function safeMediaUrlOrEmpty(message = "must be a safe media URL") {
|
|
383
348
|
return safeMediaUrl(message).optional().or(z.literal(""));
|
|
@@ -1421,4 +1386,4 @@ var videolistSchema = z.object({
|
|
|
1421
1386
|
internationalCoverage: internationalCoverageSchema.optional()
|
|
1422
1387
|
});
|
|
1423
1388
|
|
|
1424
|
-
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS,
|
|
1389
|
+
export { BLOCKED_IMAGE_HOSTS, BLOCKED_URL_HOSTS, 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, EncyclopediaIngestTriageDecisionSchema, EncyclopediaIngestTriageSchema, 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, TAXONOMY_ICON_ALLOWLIST, TOOL_DESCRIPTIONS, TOOL_NAMES, TaxonomyPairVerdictSchema, VARIANT_NAMES, cardSchema, categorizeTools, clampCognitionLimit, clampEpisodeProbeLimit, clampEpisodeRecencyMidpoint, clampEpisodeRecencyScaleSeconds, clampEpisodeRecencyWeight, clampEpisodeScoreThreshold, compareSchema, createTextItemSchema, deriveSchemaKeys, describeSchema, discardedReferenceSchema, formatZodIssues, formatZodShape, galleryItemSchema, hasBlockedImageHost, heroVideoHasTitle, imagelistSchema, internationalCoverageSchema, isAbsoluteHttpUrl, isAllFieldsNullWipe, isImageTaskTemplate, isPrivateOrLocalhost, isTrustedImageUrl, isTrustedUrl, markerSchema, memoryProfileResponseSchema, mergeCognitionProfiles, normalizeInsightPath, ocrSchema, parseStoredProfile, productSchema, pruneProfileTopic, referenceGalleryItemSchema, referenceLineSchema, relatedStorySchema, safeMediaUrl, safeMediaUrlOrEmpty, safeUrl, safeVideoUrl, safeVideoUrlOrEmpty, shoplistSchema, sourceSchema, stockmarketItemSchema, stockmarketListSchema, summarySchema, videoGalleryItemSchema, videolistSchema };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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": "
|
|
5
|
-
"packageManager": "pnpm@12.
|
|
6
|
-
"license": "
|
|
4
|
+
"version": "2.0.2",
|
|
5
|
+
"packageManager": "pnpm@12.19.0",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
"./schemas": {
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@mozilla/readability": "^0.6.0",
|
|
58
|
-
"@triplef/helpers": "^1.6.
|
|
58
|
+
"@triplef/helpers": "^1.6.4",
|
|
59
59
|
"linkedom": "^0.18.15",
|
|
60
60
|
"turndown": "^7.2.5"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"ai": "^7.0.
|
|
63
|
+
"ai": "^7.0.166",
|
|
64
64
|
"zod": "^4.6.7"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"ts-unused-exports": "^11.0.1",
|
|
93
93
|
"tsup": "^8.5.1",
|
|
94
94
|
"typescript": "^5.9.3",
|
|
95
|
-
"typescript-eslint": "^8.72.
|
|
95
|
+
"typescript-eslint": "^8.72.2",
|
|
96
96
|
"vitest": "^5.1.0"
|
|
97
97
|
}
|
|
98
98
|
}
|