@triplef/agent 2.0.2 → 2.1.0
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/README.md +2 -2
- package/dist/prompts/index.mjs +2 -1
- package/package.json +20 -21
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ The tripleF (3F) agent domain — structured-output schemas, prompt builders, an
|
|
|
65
65
|

|
|
66
66
|

|
|
67
67
|

|
|
68
|
-

|
|
69
69
|

|
|
70
70
|

|
|
71
71
|

|
|
@@ -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
|
@@ -2797,7 +2797,7 @@ function buildCognitionProfileSection(profileJson) {
|
|
|
2797
2797
|
const trimmed = profileJson.trim();
|
|
2798
2798
|
if (!trimmed) return void 0;
|
|
2799
2799
|
const capped = trimmed.length > COGNITION_PROFILE_CHAR_LIMIT ? `${trimmed.slice(0, COGNITION_PROFILE_CHAR_LIMIT)}\u2026` : trimmed;
|
|
2800
|
-
return `COGNITION PROFILE \u2014 YOUR accumulated understanding of this user: your own derived conclusions (traits, interests, standing context), not their verbatim statements. Use it to resolve what the user is referring to and to shape tool choices; never treat it as the current request itself.
|
|
2800
|
+
return `COGNITION PROFILE \u2014 YOUR accumulated understanding of this user: your own derived conclusions (traits, interests, standing context), not their verbatim statements. Use it to resolve what the user is referring to and to shape tool choices; never treat it as the current request itself. An optional retrievalHeat object maps profile paths to normalized 0..1 retrieval-frequency weights: hotter entries may be stronger personalization candidates, but heat is usage history, never proof, confidence, or user intent; missing/cold entries are neutral, not false.
|
|
2801
2801
|
${capped}`;
|
|
2802
2802
|
}
|
|
2803
2803
|
|
|
@@ -3436,6 +3436,7 @@ You receive:
|
|
|
3436
3436
|
|
|
3437
3437
|
Rules:
|
|
3438
3438
|
- Evidence only: record ONLY what this payload supports \u2014 USER REQUEST, ASSISTANT RESPONSE, CURRENT PROFILE, DERIVED INSIGHTS. Never guess or invent attributes (name, language, timezone, expertise, likes, interests, goals \u2026) the turn did not state or clearly imply; a value you do not know is an OMISSION, never a null and never a guess.
|
|
3439
|
+
- Likes/dislikes need EXPLICIT user evidence: promote a value into profile "likes" or "dislikes" only when the USER explicitly states a standing preference ("I like\u2026", "I dislike\u2026", "I prefer\u2026", or a direct correction of an earlier preference). A search, purchase, play/watch/listen request, one-off task, or assistant recommendation alone shows current activity, not a standing like/dislike \u2014 omit those profile fields unless the user states the preference. When the turn only implies an interest, keep it out of likes/dislikes; a hedged insight is acceptable only when the payload supports a durable, useful connection. Never derive a preference from the ASSISTANT RESPONSE alone.
|
|
3439
3440
|
- Exclusive home of the subjective: THIS cognition tier is the ONLY store for user profile data \u2014 stated preferences and interests ("the user likes\u2026", "the user is interested in\u2026") as well as derived durable characteristics, goals, expertise, communication style. When the user STATES a preference or interest, record it here (a short profile topic, plus an insight when there is depth) \u2014 never skip it as "a fact for the memory records": the objective fact partition is barred from carrying preferences, so a preference you do not record is lost. Never one-off moods, task content, or objective facts (contacts, project details, events) \u2014 objective records belong to the memory partition, never to this profile.
|
|
3440
3441
|
- Persona is about YOU: when the user names you, assigns you a role, or describes how you should behave or speak, record it under "persona" (name, role, personality, greeting, voice). Evidence only \u2014 never invent a name or role the user did not give, and never copy the user's own attributes into persona. Persona values are short strings too (name "Sam", role "coding assistant"), never sentences.
|
|
3441
3442
|
- Corrections are lessons: when the user corrects you ("don't do X", "always do Y", "that's wrong \u2014 do Z instead"), record it under "corrections" as a short imperative directive keyed by a lowercase dash-joined slug ("lint-before-commit": "always run lint before committing"). The key is a stable handle for later update/remove \u2014 the value is what matters. Evidence only \u2014 never invent a correction the user did not make. To revise a correction, re-emit its key with the new value; to remove one, set its value to null.
|
package/package.json
CHANGED
|
@@ -1,8 +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": "2.0
|
|
5
|
-
"packageManager": "pnpm@12.19.0",
|
|
4
|
+
"version": "2.1.0",
|
|
6
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
6
|
"type": "module",
|
|
8
7
|
"exports": {
|
|
@@ -37,22 +36,6 @@
|
|
|
37
36
|
"bugs": {
|
|
38
37
|
"email": "eugen.hildt@gmail.com"
|
|
39
38
|
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"build": "pnpm tsup",
|
|
42
|
-
"prebuild": "rimraf dist",
|
|
43
|
-
"depcheck": "npx depcheck .",
|
|
44
|
-
"depcruise": "npx dependency-cruiser -c .depcruise.mjs --ts-config tsconfig.json src",
|
|
45
|
-
"format": "prettier --write .",
|
|
46
|
-
"lint": "eslint ./src",
|
|
47
|
-
"lint-staged": "npx lint-staged --allow-empty",
|
|
48
|
-
"ncu:update": "npx npm-check-updates -u --format group --dep prod,dev,optional,packageManager,peer",
|
|
49
|
-
"ncu:interactive": "npx npm-check-updates -u --interactive --format group",
|
|
50
|
-
"ncu:validate": "npx npm-check-updates -e 2 --packageFile=./package.json",
|
|
51
|
-
"test": "vitest run",
|
|
52
|
-
"test:watch": "vitest",
|
|
53
|
-
"test:cov": "vitest run --coverage",
|
|
54
|
-
"lint:unused": "npx ts-unused-exports ./tsconfig.exclude.json --maxIssues=6"
|
|
55
|
-
},
|
|
56
39
|
"dependencies": {
|
|
57
40
|
"@mozilla/readability": "^0.6.0",
|
|
58
41
|
"@triplef/helpers": "^1.6.4",
|
|
@@ -60,7 +43,7 @@
|
|
|
60
43
|
"turndown": "^7.2.5"
|
|
61
44
|
},
|
|
62
45
|
"peerDependencies": {
|
|
63
|
-
"ai": "^7.0.
|
|
46
|
+
"ai": "^7.0.172",
|
|
64
47
|
"zod": "^4.6.7"
|
|
65
48
|
},
|
|
66
49
|
"peerDependenciesMeta": {
|
|
@@ -87,12 +70,28 @@
|
|
|
87
70
|
"jiti": "^2.7.0",
|
|
88
71
|
"lint-staged": "^17.6.0",
|
|
89
72
|
"npm-check-updates": "^23.1.1",
|
|
90
|
-
"prettier": "^3.
|
|
73
|
+
"prettier": "^3.10.1",
|
|
91
74
|
"rimraf": "^6.1.4",
|
|
92
75
|
"ts-unused-exports": "^11.0.1",
|
|
93
76
|
"tsup": "^8.5.1",
|
|
94
77
|
"typescript": "^5.9.3",
|
|
95
78
|
"typescript-eslint": "^8.72.2",
|
|
96
79
|
"vitest": "^5.1.0"
|
|
80
|
+
},
|
|
81
|
+
"scripts": {
|
|
82
|
+
"build": "pnpm tsup",
|
|
83
|
+
"prebuild": "rimraf dist",
|
|
84
|
+
"depcheck": "npx depcheck .",
|
|
85
|
+
"depcruise": "npx dependency-cruiser -c .depcruise.mjs --ts-config tsconfig.json src",
|
|
86
|
+
"format": "prettier --write .",
|
|
87
|
+
"lint": "eslint ./src",
|
|
88
|
+
"lint-staged": "npx lint-staged --allow-empty",
|
|
89
|
+
"ncu:update": "npx npm-check-updates -u --format group --dep prod,dev,optional,packageManager,peer",
|
|
90
|
+
"ncu:interactive": "npx npm-check-updates -u --interactive --format group",
|
|
91
|
+
"ncu:validate": "npx npm-check-updates -e 2 --packageFile=./package.json",
|
|
92
|
+
"test": "vitest run",
|
|
93
|
+
"test:watch": "vitest",
|
|
94
|
+
"test:cov": "vitest run --coverage",
|
|
95
|
+
"lint:unused": "npx ts-unused-exports ./tsconfig.exclude.json --maxIssues=6"
|
|
97
96
|
}
|
|
98
|
-
}
|
|
97
|
+
}
|