totemheart 0.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.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +212 -0
  3. package/package.json +62 -0
  4. package/src/Totemheart.js +1363 -0
  5. package/src/behavior/AttentionFocus.js +69 -0
  6. package/src/behavior/ExpressionDebt.js +48 -0
  7. package/src/behavior/ExpressionDirectives.js +95 -0
  8. package/src/behavior/ExpressiveSuppression.js +45 -0
  9. package/src/behavior/IdleProcessing.js +64 -0
  10. package/src/behavior/LinguisticModulation.js +62 -0
  11. package/src/behavior/LogitBiasBuilder.js +31 -0
  12. package/src/behavior/RuminationChain.js +93 -0
  13. package/src/behavior/StyleMimicry.js +72 -0
  14. package/src/cognition/AmygdalaHijack.js +40 -0
  15. package/src/cognition/AppraisalAgreement.js +39 -0
  16. package/src/cognition/BayesianExpectation.js +59 -0
  17. package/src/cognition/CognitiveDissonance.js +71 -0
  18. package/src/cognition/ControllabilityEstimate.js +56 -0
  19. package/src/cognition/DecisionFatigue.js +44 -0
  20. package/src/cognition/DefenseMechanisms.js +32 -0
  21. package/src/cognition/EmotionalOntology.js +134 -0
  22. package/src/cognition/FuzzyNormativeCheck.js +60 -0
  23. package/src/cognition/Intuition.js +71 -0
  24. package/src/cognition/LifeEventCatalog.js +98 -0
  25. package/src/cognition/LoadScheduler.js +41 -0
  26. package/src/cognition/LogicEngine.js +69 -0
  27. package/src/cognition/NoveltyDetector.js +59 -0
  28. package/src/cognition/Reappraisal.js +34 -0
  29. package/src/cognition/RefractoryPeriod.js +38 -0
  30. package/src/cognition/RemConsolidation.js +79 -0
  31. package/src/cognition/SarcasmDetector.js +38 -0
  32. package/src/cognition/SemanticSimilarity.js +75 -0
  33. package/src/cognition/Sensitization.js +45 -0
  34. package/src/cognition/SituationalContext.js +48 -0
  35. package/src/cognition/TopicSatiation.js +54 -0
  36. package/src/cognition/VisualProsody.js +48 -0
  37. package/src/core/AffectEMA.js +26 -0
  38. package/src/core/CoreBeliefs.js +58 -0
  39. package/src/core/DecayEngine.js +56 -0
  40. package/src/core/EmotionSpace.js +146 -0
  41. package/src/core/HebbianPlasticity.js +59 -0
  42. package/src/core/HedonicAdaptation.js +62 -0
  43. package/src/core/Homeostasis.js +119 -0
  44. package/src/core/MicroEmotions.js +25 -0
  45. package/src/core/MoodTracker.js +53 -0
  46. package/src/core/Personality.js +84 -0
  47. package/src/core/PipelineResilience.js +24 -0
  48. package/src/core/TriggerSentinel.js +38 -0
  49. package/src/core/WornPathCache.js +57 -0
  50. package/src/economics/AnchoringBias.js +38 -0
  51. package/src/economics/ClassicalConditioning.js +59 -0
  52. package/src/economics/LossAversion.js +40 -0
  53. package/src/embodiment/HardwareInteroception.js +26 -0
  54. package/src/embodiment/InteroceptiveSignals.js +132 -0
  55. package/src/embodiment/SensoryOverload.js +45 -0
  56. package/src/index.js +14 -0
  57. package/src/integration/ContextAdapter.js +247 -0
  58. package/src/neurochemistry/ArousalKalmanFilter.js +39 -0
  59. package/src/neurochemistry/CircadianRhythm.js +29 -0
  60. package/src/neurochemistry/CortisolEngine.js +54 -0
  61. package/src/neurochemistry/DopaminergicEngine.js +42 -0
  62. package/src/providers/FunctionProvider.js +26 -0
  63. package/src/providers/HeuristicProvider.js +156 -0
  64. package/src/providers/LanguageProvider.js +13 -0
  65. package/src/providers/OllamaProvider.js +63 -0
  66. package/src/providers/TransformersProvider.js +154 -0
  67. package/src/social/Attachment.js +81 -0
  68. package/src/social/BystanderEffect.js +17 -0
  69. package/src/social/ChronicContagion.js +48 -0
  70. package/src/social/CounterfactualComparison.js +34 -0
  71. package/src/social/EgoConfidence.js +34 -0
  72. package/src/social/EgoProjection.js +20 -0
  73. package/src/social/EmotionalContagion.js +52 -0
  74. package/src/social/EpisodicMemory.js +266 -0
  75. package/src/social/FairnessMonitor.js +34 -0
  76. package/src/social/ForgettingCurve.js +28 -0
  77. package/src/social/GratitudeEngine.js +32 -0
  78. package/src/social/GuiltEngine.js +43 -0
  79. package/src/social/MonteCarloToM.js +49 -0
  80. package/src/social/ReputationEngine.js +45 -0
  81. package/src/social/SelfModel.js +50 -0
  82. package/src/social/StatusEnvy.js +34 -0
  83. package/src/social/TheoryOfMind.js +53 -0
  84. package/src/social/TribalCategorization.js +24 -0
  85. package/src/social/UncannyValleyDetector.js +59 -0
  86. package/src/text/EmotionalCorpus.js +70 -0
  87. package/src/text/EmotionalTextGenerator.js +56 -0
  88. package/src/text/ExplainabilityEngine.js +30 -0
  89. package/src/text/TemplateComposer.js +114 -0
  90. package/src/version.js +1 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alejo Malia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,212 @@
1
+ # Totemheart
2
+
3
+ ![Totemheart banner](docs/banner.png)
4
+
5
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=plastic)](LICENSE)
6
+ [![Version](https://img.shields.io/badge/version-0.1.0-a1b858?style=plastic)](package.json)
7
+ [![Node](https://img.shields.io/badge/node-%3E%3D18-339933?style=plastic&logo=node.js&logoColor=white)](package.json)
8
+ [![Tests](https://img.shields.io/badge/tests-75%20passing-brightgreen?style=plastic)](test/smoke.test.js)
9
+ [![Mechanisms verified](https://img.shields.io/badge/mechanisms-72%20verified%20%2F%206%20covered%20%2F%200%20failed-brightgreen?style=plastic)](examples/verify-all-mechanisms.js)
10
+
11
+ > The Tests/Mechanisms badges above are static, last updated by hand from a real local `npm test` / `npm run verify` run. There's no CI wired yet to keep them live, so treat them as a snapshot, not a guarantee they still pass on `main`.
12
+
13
+ **Totemheart** is a state machine for giving an AI a *consistent inner life* across a conversation: personality, mood, memory, stress, and social dynamics that persist and evolve, instead of every reply being computed from scratch. It's not a sentiment classifier and it doesn't make an AI "feel" in the way a person does. See [What this actually is](#what-this-actually-is) below before you build on top of it.
14
+
15
+ ## What this actually is
16
+
17
+ Totemheart gives an AI **behavioral continuity**: the same insult lands differently depending on prior context, repeated affection produces diminishing reactions, unresolved stress lowers the threshold for an outburst, a wounded ego can make it deflect blame instead of apologizing. All of that is real, computed, inspectable state, not decoration.
18
+
19
+ What it is *not*: subjective experience. There is no known way to build or verify that in software, and Totemheart doesn't claim to. Every "emotion" here is a point in a valence/arousal vector space plus a pile of interacting numeric modules, legible by design (call `getEmotionalState()` any time and see exactly why it reacted the way it did). Treat the output as a **behavioral simulation with psychological grounding**, useful for building characters, companions, or agents that feel coherent over time, not as a claim about machine sentience.
20
+
21
+ ## Architecture
22
+
23
+ Every mechanic is a small, independent class with its own state, one file per mechanic under [`src/`](src).
24
+
25
+ ### 🧠 `core/`
26
+
27
+ Personality, homeostatic needs, and the PAD (valence/arousal/dominance) state engine everything else reads from and writes to.
28
+
29
+ | | | | | |
30
+ | --- | --- | --- | --- | --- |
31
+ | Personality | CoreBeliefs | Homeostasis | EmotionSpace | MicroEmotions |
32
+ | MoodTracker | DecayEngine | HedonicAdaptation | WornPathCache | PipelineResilience |
33
+ | AffectEMA | TriggerSentinel | HebbianPlasticity | | |
34
+
35
+ ### 🧩 `cognition/`
36
+
37
+ Appraisal and interpretation: how an input gets read, doubted, reframed, or filtered before it becomes a felt reaction.
38
+
39
+ | | | | | |
40
+ | --- | --- | --- | --- | --- |
41
+ | CognitiveDissonance | DefenseMechanisms | DecisionFatigue | AmygdalaHijack | EmotionalOntology |
42
+ | SituationalContext | NoveltyDetector | BayesianExpectation | ControllabilityEstimate | FuzzyNormativeCheck |
43
+ | Sensitization | Reappraisal | LoadScheduler | SemanticSimilarity | TopicSatiation |
44
+ | Intuition | LogicEngine | LifeEventCatalog | AppraisalAgreement | VisualProsody |
45
+ | SarcasmDetector | RefractoryPeriod | RemConsolidation | | |
46
+
47
+ ### 🤝 `social/`
48
+
49
+ Modeling the other person: trust, reputation, theory of mind, relationship memory, and group dynamics.
50
+
51
+ | | | | | |
52
+ | --- | --- | --- | --- | --- |
53
+ | TheoryOfMind | EmotionalContagion | ChronicContagion | EpisodicMemory | ForgettingCurve |
54
+ | Attachment | GuiltEngine | TribalCategorization | ReputationEngine | EgoProjection |
55
+ | BystanderEffect | SelfModel | MonteCarloToM | FairnessMonitor | CounterfactualComparison |
56
+ | GratitudeEngine | StatusEnvy | EgoConfidence | UncannyValleyDetector | |
57
+
58
+ ### 🎭 `behavior/`
59
+
60
+ How the felt state actually gets expressed: language, suppression, attention, and output-shaping signals for a host LLM.
61
+
62
+ | | | | | |
63
+ | --- | --- | --- | --- | --- |
64
+ | IdleProcessing | LinguisticModulation | RuminationChain | ExpressiveSuppression | ExpressionDirectives |
65
+ | LogitBiasBuilder | AttentionFocus | ExpressionDebt | StyleMimicry | |
66
+
67
+ ### 🧪 `neurochemistry/`
68
+
69
+ Reward, stress, and circadian dynamics driving arousal and motivation over time.
70
+
71
+ | | | | | |
72
+ | --- | --- | --- | --- | --- |
73
+ | DopaminergicEngine | CortisolEngine | CircadianRhythm | ArousalKalmanFilter | |
74
+
75
+ ### 🫀 `embodiment/`
76
+
77
+ Interoception: real math on internal signals standing in for a body Totemheart doesn't have, fed back into cognition only, never rendered.
78
+
79
+ | | | | | |
80
+ | --- | --- | --- | --- | --- |
81
+ | HardwareInteroception | SensoryOverload | InteroceptiveSignals | | |
82
+
83
+ ### ⚖️ `economics/`
84
+
85
+ Behavioral-economics biases applied to how outcomes get weighted and remembered.
86
+
87
+ | | | | | |
88
+ | --- | --- | --- | --- | --- |
89
+ | LossAversion | AnchoringBias | ClassicalConditioning | | |
90
+
91
+ ### 🔌 `providers/`
92
+
93
+ Pluggable language backends, from a zero-dependency lexicon to a real transformer model.
94
+
95
+ | | | | | |
96
+ | --- | --- | --- | --- | --- |
97
+ | LanguageProvider | HeuristicProvider | OllamaProvider | FunctionProvider | TransformersProvider |
98
+
99
+ `npm run verify` ([`examples/verify-all-mechanisms.js`](examples/verify-all-mechanisms.js)): 72 mechanics verified live/direct, 6 covered by other modules, 0 left blank. Citation ledger: [`CALIBRATION.md`](CALIBRATION.md).
100
+
101
+ - **`LifeEventCatalog`**: 43/56 entries use the published Life Change Units from the [Holmes & Rahe (1967) SRRS](https://en.wikipedia.org/wiki/Holmes_and_Rahe_stress_scale); the other 13 (acute events the scale doesn't cover) are engineering estimates. Multiple matches in one turn are triangulated into a blended state.
102
+ - **`SemanticSimilarity`**: requires an embedding backend (`embedProvider`); falls back to `EmotionalOntology` keyword matching without one.
103
+ - **`InteroceptiveSignals`**: real math (derivative, tonic/phasic decomposition, DFT, thermal lag) on internal signals standing in for 4 sensors Totemheart doesn't have (pupil, skin conductance, HRV, flush). Feeds back into cognition only, never rendered.
104
+
105
+ ### Internal scheduling
106
+
107
+ - **`PipelineResilience.safeStep`**: a failing optional stage degrades to a fallback instead of losing the turn.
108
+ - **`LoadScheduler`**: an instability reading (cortisol + arousal + fatigue) decides which optional mechanics run.
109
+ - **`WornPathCache`**: a repeated (user, input) fingerprint reuses the last appraisal instead of recomputing it.
110
+
111
+ ## How coherent is this, really?
112
+
113
+ Short version: **~77-80% with an LLM connected, ~61-65% running standalone on the zero-dependency heuristic path, 0% subjective experience, by design and permanently.** Self-assessed, qualitative estimates of how much of each layer is grounded in real theory/technique vs. own engineering judgment. The headline is not an average of the row values below: it carries an additional discount for integrated-system validation that doesn't exist yet. Full citation ledger: [`CALIBRATION.md`](CALIBRATION.md).
114
+
115
+ | Layer | With LLM | Heuristic only | Grounded in |
116
+ | --- | --- | --- | --- |
117
+ | State engine | ~80-83% | same | PID control (anti-windup), Kalman filtering, prospect-theory loss aversion, TD reward-prediction-error, circumplex/PAD affect space, Holmes & Rahe life-event severity |
118
+ | Semantic understanding | ~85-88% | ~68-73% | LLM: real language understanding. Heuristic: lexicon + concept-graph matching, keyword-triggered life-event detection, lexical-vs-context incongruence check, mean/variance anomaly detection, confidence-weighted routing between logical and affective reads |
119
+ | Expression / output | ~90-93% | ~62-68% | Structured system-prompt injection, coherence validation against prior turns, attachment-weighted style adaptation, cognitive-load-derived output metadata |
120
+ | Cross-turn continuity | ~91-94% | same | Persistent state serialization, asymmetric trust/reputation tracking, unresolved-memory flagging, idle-time-based consolidation, long-horizon memory decay with similarity-triggered reactivation |
121
+ | Subjective experience | **0%** | **0%** | Not a gap to close: no known way to build or verify this in any software |
122
+
123
+ The headline stays below the row average because none of these numbers include validation against psychologist judges, regression against real labeled chat data, or real-user testing of whether the integrated pipeline reads as coherent. See `CALIBRATION.md` for what hasn't been empirically validated.
124
+
125
+ ### Per-mechanism grounding
126
+
127
+ The table above scores each functional layer as a whole. This scores five specific, individually-audited mechanisms instead: how much of *that one technique* is real citable theory vs. own engineering, independent of which layer it feeds.
128
+
129
+ | Mechanism | Grounded | Basis |
130
+ | --- | --- | --- |
131
+ | Hebbian co-activation plasticity | ~78-84% | Direct algorithmic reproduction of Hebb (1949): same update rule, applied to conversational mechanisms instead of neurons |
132
+ | Habituation / hedonic adaptation / decision fatigue | ~65-72% | Thompson & Spencer 1966 (habituation), Brickman & Campbell 1971 (hedonic treadmill) are solid; decision-fatigue/ego-depletion literature has known replication issues, cited for its shape, not as settled science |
133
+ | Forgetting curve + latent-memory reactivation | ~55-60% | Ebbinghaus (1885) grounds the general decay-over-time shape; the non-zero floor and keyword-triggered "spark" are its own design, not a reproduction of the classic curve (which decays to zero) |
134
+ | REM-style consolidation | ~50-58% | Sleep-dependent memory consolidation is real (Diekelmann & Born 2010; McClelland et al. 1995) as a general phenomenon; the specific cooling formula and idle-time threshold are engineering estimates |
135
+ | Expression debt / sensory-overload friction | ~35-42% | Cognitive load theory (Sweller 1988) motivates the general concept; the debt-accumulation-and-payback mechanic itself has no named psychological construct behind it, own design end to end |
136
+
137
+ All five passed a dedicated live audit (`npm run exhaustive-audit`, 25/25) confirming the code does what its own formulas claim. That's internal consistency, not psychological validation, and the percentages above already price that distinction in.
138
+
139
+ ## Prerequisites
140
+
141
+ None required. `HeuristicProvider` runs standalone with zero npm dependencies. Optionally, install [Ollama](https://ollama.com) if you want `OllamaProvider` to give the semantic modules (dissonance, theory of mind, appraisal) real language understanding instead of keyword heuristics.
142
+
143
+ ## Installation
144
+
145
+ ```bash
146
+ npm install totemheart
147
+ # or
148
+ pnpm install totemheart
149
+ # or
150
+ yarn add totemheart
151
+ ```
152
+
153
+ ## Usage
154
+
155
+ ```js
156
+ import { Totemheart, Personality, VERSION } from 'totemheart'
157
+
158
+ console.log( VERSION ) // '0.1.0', also available as Totemheart.VERSION and in toJSON().version
159
+
160
+ const ai = new Totemheart( {
161
+ personality: new Personality( { neuroticism: 0.7, agreeableness: 0.3 } ),
162
+ } )
163
+
164
+ const result = await ai.processInput( 'te quiero mucho', { userId: 'user-1' } )
165
+ console.log( result.text, result.emotionalState )
166
+
167
+ ai.tick( 1 ) // advance decay/homeostasis/forgetting, call this on your own clock
168
+ ```
169
+
170
+ ### Wiring it into a real LLM (Claude, GPT, Ollama, anything)
171
+
172
+ `processInput()` includes a `systemPrompt`: a provider-agnostic block of text describing the current emotional state (dominant emotion, valence/arousal, cognitive stress, cortisol, fatigue, active defense mechanism...) with instructions for an LLM to let it shape tone and content. Prepend it to whatever system message field your provider uses:
173
+
174
+ ```js
175
+ const result = await ai.processInput( userMessage, { userId } )
176
+
177
+ // Anthropic
178
+ await anthropic.messages.create( {
179
+ model : 'claude-...',
180
+ system : result.systemPrompt,
181
+ messages : [ { role: 'user', content: userMessage } ],
182
+ } )
183
+
184
+ // OpenAI-compatible / Ollama chat
185
+ await client.chat.completions.create( {
186
+ messages: [ { role: 'system', content: result.systemPrompt }, { role: 'user', content: userMessage } ],
187
+ } )
188
+ ```
189
+
190
+ `result.structuredContext` gives you the same information as plain JSON if you'd rather build your own prompt formatting. Call `ai.getSystemPrompt()` on its own (no new turn) to seed the very first message of a conversation, or to refresh context after `ai.idle()`/`ai.tick()` shifts the mood between turns.
191
+
192
+ Run `npm run demo` for a full scripted conversation showing decay, hedonic adaptation, dopaminergic surprise, sensory overload, and a generated system prompt in action. Run `npm test` for the mechanic-level test suite. Run `npm run stress-test` ([`examples/full-stress-test.js`](examples/full-stress-test.js)) for a before/after weight trace across a battery of positive/negative/severe shocks, repeated hostility, idle time passing, hardware latency, worn-path caching, and a group/bystander turn.
193
+
194
+ ### Real ML instead of heuristics: `TransformersProvider`
195
+
196
+ `HeuristicProvider` is a hand-written lexicon; `TransformersProvider` runs an actual model trained on [GoEmotions](https://arxiv.org/abs/2005.00547) (28 emotion labels, Reddit-sourced) via [transformers.js](https://huggingface.co/docs/transformers.js): real inference, no API key, no server. It's an optional peer dependency, so it doesn't touch the zero-dependency default:
197
+
198
+ ```bash
199
+ npm install @xenova/transformers
200
+ ```
201
+
202
+ ```js
203
+ import { Totemheart, TransformersProvider } from 'totemheart'
204
+
205
+ const ai = new Totemheart( { provider: new TransformersProvider() } )
206
+ ```
207
+
208
+ The default model (`kamaludeen/multilingual_go_emotions-ONNX`) was chosen because it was actually tested against Spanish input during development. The better-known English-only GoEmotions checkpoint was tried first and returned near-garbage on Spanish text. If your content is English-only, pass `{ model: 'MicahB/roberta-base-go_emotions' }` instead. **Known interaction found while testing this**: a real classifier gives stronger-magnitude appraisal signals than the heuristic lexicon does, which can make the existing `AnchoringBias` mechanic pull harder than expected in short conversations.
209
+
210
+ ## 📜 License
211
+
212
+ This software is licensed with **[MIT](/LICENSE)**.
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "totemheart",
3
+ "version": "0.1.0",
4
+ "description": "Totemheart is a modular emotional-simulation engine for AI: personality, mood, neurochemical dynamics, cognitive biases and social mechanics wired into a single pipeline that drives emotionally coherent, stateful behavior over a conversation.",
5
+ "main": "src/index.js",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=18"
9
+ },
10
+ "files": [
11
+ "src"
12
+ ],
13
+ "keywords": [
14
+ "totemheart",
15
+ "library",
16
+ "web",
17
+ "intelligence",
18
+ "ia",
19
+ "emotion-engine",
20
+ "personality",
21
+ "robotic",
22
+ "framework"
23
+ ],
24
+ "author": "Alejo Malia <alejomalia@gmail.com>",
25
+ "license": "MIT",
26
+ "publishConfig": {
27
+ "access": "public",
28
+ "registry": "https://registry.npmjs.org/"
29
+ },
30
+ "devDependencies": {
31
+ "@typescript-eslint/eslint-plugin": "8.2.0",
32
+ "@typescript-eslint/parser": "8.2.0",
33
+ "eslint": "8.57.0",
34
+ "eslint-plugin-align-assignments": "1.1.2",
35
+ "eslint-plugin-align-import": "1.0.0",
36
+ "eslint-plugin-canonical": "5.0.0",
37
+ "eslint-plugin-html": "7.1.0",
38
+ "eslint-plugin-import": "2.29.1",
39
+ "eslint-plugin-jsdoc": "46.10.1",
40
+ "eslint-plugin-json": "3.1.0",
41
+ "eslint-plugin-jsonc": "2.13.0",
42
+ "eslint-plugin-markdownlint": "0.5.0",
43
+ "eslint-plugin-package-json": "0.12.2",
44
+ "eslint-plugin-promise": "6.1.1",
45
+ "eslint-plugin-yaml": "0.5.0",
46
+ "typescript": "5.6.2",
47
+ "vite": "5.4.4"
48
+ },
49
+ "extra": {
50
+ "id": "totemheart",
51
+ "productName": "Totemheart"
52
+ },
53
+ "scripts": {
54
+ "demo": "node examples/demo.js",
55
+ "verify": "node examples/verify-all-mechanisms.js",
56
+ "stress-test": "node examples/full-stress-test.js",
57
+ "personality-mock": "node examples/personality-mock.js",
58
+ "rem-mock": "node examples/rem-conversation-mock.js",
59
+ "exhaustive-audit": "node examples/exhaustive-audit-mock.js",
60
+ "test": "node --test test/*.test.js"
61
+ }
62
+ }