@triplef/agent 2.0.0 → 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 +3 -3
- package/dist/prompts/index.mjs +2 -2
- package/dist/schemas/index.mjs +2 -2
- 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
|
@@ -33,7 +33,7 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
33
33
|
# Dependencies
|
|
34
34
|
|
|
35
35
|
[](https://github.com/mozilla/readability)
|
|
36
|
-
[](https://github.com/ehildt/tripleF)
|
|
37
37
|
[](https://github.com/WebReflection/linkedom)
|
|
38
38
|
[](https://github.com/mixmark-io/turndown)
|
|
39
39
|
|
|
@@ -70,7 +70,7 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
70
70
|

|
|
71
71
|

|
|
72
72
|

|
|
73
|
-

|
|
74
74
|

|
|
75
75
|
|
|
76
76
|
</div>
|
|
@@ -83,7 +83,7 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
83
83
|
|
|
84
84
|
# PeerDependencies
|
|
85
85
|
|
|
86
|
-
[](https://github.com/vercel/ai)
|
|
87
87
|
[](https://github.com/colinhacks/zod)
|
|
88
88
|
|
|
89
89
|
</div>
|
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
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -339,10 +339,10 @@ function isTrustedUrl(url, options = {}) {
|
|
|
339
339
|
}
|
|
340
340
|
return true;
|
|
341
341
|
}
|
|
342
|
-
var
|
|
342
|
+
var OBJECT_STORAGE_URL_PATTERN = /^\/api\/v1\/object-storage\/[A-Za-z0-9_-]+\/[A-Za-z0-9_-]+\/[A-Za-z0-9]+$/;
|
|
343
343
|
function safeMediaUrl(message = "must be a safe media URL") {
|
|
344
344
|
const text = typeof message === "string" ? message : message.message;
|
|
345
|
-
return z.string().refine((value) =>
|
|
345
|
+
return z.string().refine((value) => OBJECT_STORAGE_URL_PATTERN.test(value) || isAbsoluteHttpUrl(value), { message: text });
|
|
346
346
|
}
|
|
347
347
|
function safeMediaUrlOrEmpty(message = "must be a safe media URL") {
|
|
348
348
|
return safeMediaUrl(message).optional().or(z.literal(""));
|
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": "2.0.
|
|
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
|
}
|