@wordbricks/persona 0.1.0 → 0.1.1
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 +12 -0
- package/package.json +32 -5
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @wordbricks/persona
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
3
6
|
`@wordbricks/persona` is a persona memory and runtime library for LLM agents. It gives an application a durable memory substrate, a turn planner, prompt context assembly, and post-response memory review without owning your database connection, model provider, embedder, chat stack, or deployment runtime.
|
|
4
7
|
|
|
5
8
|
The memory model is brain-inspired rather than a single global vector search. Tonic identity memory - beliefs, habits, and style - has independent selection budgets from phasic episodic/source memory, so stable identity does not get crowded out by recent events. Recall combines lexical overlap with pgvector cosine similarity, then applies one-hop spreading activation across linked memories. Episodic availability follows an exponential forgetting curve, but recent activation and emotional salience can strengthen recall. Mood is represented as PAD (`valence`, `arousal`, `dominance`) and decays between turns. Beliefs are reconsolidated through reinforcement and contradiction, not overwritten. During generation, an agent can perform re-entrant recall by calling back into memory with a specific cue.
|
|
@@ -224,6 +227,15 @@ The root export re-exports `./memory`, `./schema`, and `./agent`, so most applic
|
|
|
224
227
|
|
|
225
228
|
Read [RESPONSIBLE_USE.md](./RESPONSIBLE_USE.md) before enabling personas for real users. Persona simulation of real people requires consent, authorization, or a carefully reviewed public-material-only basis. `PERSONA_PROFILE_TYPES` distinguishes fictional/composite characters, living public figures, deceased public figures, private authorized people, and synthetic roles; `PERSONA_CONSENT_STATUSES` records the consent basis. Real-person personas should not be activated with `unknown` consent outside controlled review, and disclosures should make clear that users are interacting with an AI persona system, not the biological person.
|
|
226
229
|
|
|
230
|
+
## Development
|
|
231
|
+
|
|
232
|
+
```sh
|
|
233
|
+
bun install
|
|
234
|
+
bun run test
|
|
235
|
+
bun run typecheck
|
|
236
|
+
bun run build
|
|
237
|
+
```
|
|
238
|
+
|
|
227
239
|
## License
|
|
228
240
|
|
|
229
241
|
Apache-2.0. See [LICENSE](./LICENSE) and [NOTICE](./NOTICE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordbricks/persona",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Brain-inspired persona memory and runtime for LLM agents on Postgres/pgvector via Drizzle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -23,19 +23,23 @@
|
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
|
-
"import": "./dist/index.js"
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"default": "./dist/index.js"
|
|
27
28
|
},
|
|
28
29
|
"./schema": {
|
|
29
30
|
"types": "./dist/schema/index.d.ts",
|
|
30
|
-
"import": "./dist/schema/index.js"
|
|
31
|
+
"import": "./dist/schema/index.js",
|
|
32
|
+
"default": "./dist/schema/index.js"
|
|
31
33
|
},
|
|
32
34
|
"./memory": {
|
|
33
35
|
"types": "./dist/memory/index.d.ts",
|
|
34
|
-
"import": "./dist/memory/index.js"
|
|
36
|
+
"import": "./dist/memory/index.js",
|
|
37
|
+
"default": "./dist/memory/index.js"
|
|
35
38
|
},
|
|
36
39
|
"./agent": {
|
|
37
40
|
"types": "./dist/agent/index.d.ts",
|
|
38
|
-
"import": "./dist/agent/index.js"
|
|
41
|
+
"import": "./dist/agent/index.js",
|
|
42
|
+
"default": "./dist/agent/index.js"
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
"files": [
|
|
@@ -46,13 +50,36 @@
|
|
|
46
50
|
"ARCHITECTURE.md",
|
|
47
51
|
"RESPONSIBLE_USE.md"
|
|
48
52
|
],
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/wordbricks/persona.git"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/wordbricks/persona#readme",
|
|
58
|
+
"bugs": "https://github.com/wordbricks/persona/issues",
|
|
49
59
|
"publishConfig": {
|
|
50
60
|
"access": "public"
|
|
51
61
|
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsup",
|
|
64
|
+
"typecheck": "tsc --noEmit",
|
|
65
|
+
"test": "vitest run",
|
|
66
|
+
"test:watch": "vitest",
|
|
67
|
+
"prepublishOnly": "bun run build"
|
|
68
|
+
},
|
|
52
69
|
"dependencies": {
|
|
53
70
|
"ulid": "3.0.2",
|
|
54
71
|
"zod": "4.3.5"
|
|
55
72
|
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@types/bun": "1.3.14",
|
|
75
|
+
"@types/pg": "8.16.0",
|
|
76
|
+
"drizzle-orm": "0.45.2",
|
|
77
|
+
"pg": "8.17.1",
|
|
78
|
+
"postgres": "3.4.8",
|
|
79
|
+
"tsup": "8.5.1",
|
|
80
|
+
"typescript": "6.0.3",
|
|
81
|
+
"vitest": "4.1.0"
|
|
82
|
+
},
|
|
56
83
|
"peerDependencies": {
|
|
57
84
|
"drizzle-orm": "^0.45.2"
|
|
58
85
|
}
|