totemheart 0.1.4 → 0.1.5
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 +53 -27
- package/package.json +1 -1
- package/src/Totemheart.js +301 -7
- package/src/behavior/CreativeModeSwitch.js +47 -0
- package/src/behavior/RegulationStrategySelector.js +90 -0
- package/src/cognition/EmotionalForecasting.js +76 -0
- package/src/cognition/EmotionalImmuneSystem.js +68 -0
- package/src/cognition/EnergyBudget.js +68 -0
- package/src/cognition/GlobalWorkspace.js +57 -0
- package/src/cognition/InsightGenerator.js +98 -0
- package/src/cognition/MetaEmotionLayer.js +67 -0
- package/src/cognition/OntogenicDevelopment.js +68 -0
- package/src/cognition/ValueHierarchy.js +26 -0
- package/src/core/MoralInjury.js +41 -3
- package/src/core/PrimaryDrives.js +85 -0
- package/src/embodiment/InteroceptivePredictionError.js +13 -4
- package/src/embodiment/SomaticMarkerNetwork.js +78 -0
- package/src/index.js +2 -0
- package/src/social/BetrayalTraumaTrace.js +71 -0
- package/src/social/ColonyDynamics.js +91 -0
- package/src/social/CulturalScriptLibrary.js +107 -0
- package/src/social/IdentityThreatMonitor.js +28 -0
- package/src/social/JealousyTriangle.js +42 -0
- package/src/social/LegacyMemory.js +101 -0
- package/src/social/MultiAgentSocialGraph.js +105 -0
- package/src/social/NarrativeSelfEngine.js +99 -0
- package/src/social/PowerDynamicsEngine.js +79 -0
- package/src/version.js +1 -1
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](CALIBRATION.md)
|
|
7
|
-
[](package.json)
|
|
8
8
|
[](package.json)
|
|
9
|
-
[](test)
|
|
10
|
+
[](examples/verify-all-mechanisms.js)
|
|
11
11
|
|
|
12
|
-
> The Tests/Mechanisms badges
|
|
12
|
+
> The Tests/Mechanisms badges are static, updated by hand from a real local `npm test` / `npm run verify` run. There's no CI wired up yet, so treat them as a snapshot, not a live guarantee on `main`. `npm test` runs [`test/`](test) in full: `regression/` (92), `integration/` (341, directed and cross-mechanism scenarios, full-pipeline emergency routes, serialization, malformed-input robustness, and per-round dedicated suites, see [`test/integration/`](test/integration)), and `property/` (2029, deterministic boundary/grid checks, no randomness). `npm run test:all` additionally runs `test:plugins` (49 more across the 7 official plugins below plus cross-integration scenarios in [`test/plugins-cross/`](test/plugins-cross)), for 2511 real tests total. Two earlier mechanism rounds also ship their own dedicated live audit outside this count: `npm run upgrade-round-mock` (39/39) and `npm run lovehate-mock` (24/24).
|
|
13
13
|
|
|
14
14
|
**Totemheart** is a deterministic control kernel for persistent cognition, not a sentiment classifier and not a prompt-engineering trick. It gives an AI a *consistent inner life* across a conversation: personality, mood, memory, stress, and social dynamics that persist and evolve through real control-theory and neuroscience-derived math, instead of every reply being computed from scratch off a mood label. See [What this actually is](#what-this-actually-is) below before you build on top of it.
|
|
15
15
|
|
|
@@ -46,7 +46,9 @@ Personality, homeostatic needs, and the PAD (valence/arousal/dominance) state en
|
|
|
46
46
|
| Personality | CoreBeliefs | Homeostasis | EmotionSpace | MicroEmotions |
|
|
47
47
|
| MoodTracker | DecayEngine | HedonicAdaptation | WornPathCache | PipelineResilience |
|
|
48
48
|
| AffectEMA | TriggerSentinel | HebbianPlasticity | CommitmentDevice | MoralInjury |
|
|
49
|
-
| OpponentProcess | | | | |
|
|
49
|
+
| OpponentProcess | PrimaryDrives | | | |
|
|
50
|
+
|
|
51
|
+
`MoralInjury` also carries a real redemption-arc extension (`recordRepairAction`/`attemptRedemption`) added in 0.1.5: consistent, real repair credit progressively (never fully) heals a scar.
|
|
50
52
|
|
|
51
53
|
### 🧩 `cognition/`
|
|
52
54
|
|
|
@@ -59,7 +61,12 @@ Appraisal and interpretation: how an input gets read, doubted, reframed, or filt
|
|
|
59
61
|
| Sensitization | Reappraisal | LoadScheduler | SemanticSimilarity | TopicSatiation |
|
|
60
62
|
| Intuition | LogicEngine | LifeEventCatalog | AppraisalAgreement | VisualProsody |
|
|
61
63
|
| SarcasmDetector | RefractoryPeriod | RemConsolidation | AnticipatoryAffect | MotivationalConflict |
|
|
62
|
-
| EgoDepletionBudget | ValueHierarchy | | | |
|
|
64
|
+
| EgoDepletionBudget | ValueHierarchy | OntogenicDevelopment | MetaEmotionLayer | EmotionalForecasting |
|
|
65
|
+
| InsightGenerator | EnergyBudget | GlobalWorkspace | EmotionalImmuneSystem | |
|
|
66
|
+
|
|
67
|
+
`ValueHierarchy` also carries a real long-run drift extension (`drift()`, added in 0.1.5, distinct from the per-conflict `nudge()` EMA): repeated real experience, not a single event, slowly moves what an agent actually values.
|
|
68
|
+
|
|
69
|
+
`GlobalWorkspace`, `PrimaryDrives`, and `EmotionalImmuneSystem` (added in 0.1.5) are a real softmax competition for which stimulus wins access to output-shaping this turn (Baars 1988/2005; Dehaene & Naccache 2001; explicitly not a claim of modeling consciousness), four of Panksepp's real primary-process drive systems (SEEKING/CARE/PLAY/PANIC_GRIEF, Panksepp 1998), and real bounded numbing under sustained negativity (Gilbert 1989/2009), respectively. See [`CALIBRATION.md`](CALIBRATION.md) for the full citation ledger.
|
|
63
70
|
|
|
64
71
|
### 🤝 `social/`
|
|
65
72
|
|
|
@@ -72,7 +79,10 @@ Modeling the other person: trust, reputation, theory of mind, relationship memor
|
|
|
72
79
|
| BystanderEffect | SelfModel | MonteCarloToM | FairnessMonitor | CounterfactualComparison |
|
|
73
80
|
| GratitudeEngine | StatusEnvy | EgoConfidence | UncannyValleyDetector | LoveHateEngine |
|
|
74
81
|
| GriefEngine | ShameGuiltSplit | RepairProtocol | JealousyTriangle | NostalgiaEngine |
|
|
75
|
-
| PainSocialOverlap | IdentityThreatMonitor | SocialBaselineTheory | | |
|
|
82
|
+
| PainSocialOverlap | IdentityThreatMonitor | SocialBaselineTheory | NarrativeSelfEngine | LegacyMemory |
|
|
83
|
+
| MultiAgentSocialGraph | CulturalScriptLibrary | PowerDynamicsEngine | BetrayalTraumaTrace | ColonyDynamics |
|
|
84
|
+
|
|
85
|
+
`IdentityThreatMonitor` also carries a real repair-cost extension (`computeThreat`/`computeRepairCost`/`applyRepair`, 0.1.5) and `JealousyTriangle` a real kindling extension (`computeKindling`, 0.1.5): repeated jealousy toward the same rival compounds instead of resetting.
|
|
76
86
|
|
|
77
87
|
### 🎭 `behavior/`
|
|
78
88
|
|
|
@@ -81,7 +91,8 @@ How the felt state actually gets expressed: language, suppression, attention, an
|
|
|
81
91
|
| | | | | |
|
|
82
92
|
| --- | --- | --- | --- | --- |
|
|
83
93
|
| IdleProcessing | LinguisticModulation | RuminationChain | ExpressiveSuppression | ExpressionDirectives |
|
|
84
|
-
| LogitBiasBuilder | AttentionFocus | ExpressionDebt | StyleMimicry | |
|
|
94
|
+
| LogitBiasBuilder | AttentionFocus | ExpressionDebt | StyleMimicry | RegulationStrategySelector |
|
|
95
|
+
| CreativeModeSwitch | | | | |
|
|
85
96
|
|
|
86
97
|
### 🧪 `neurochemistry/`
|
|
87
98
|
|
|
@@ -98,7 +109,9 @@ Interoception: real math on internal signals standing in for a body Totemheart d
|
|
|
98
109
|
|
|
99
110
|
| | | | | |
|
|
100
111
|
| --- | --- | --- | --- | --- |
|
|
101
|
-
| HardwareInteroception | SensoryOverload | InteroceptiveSignals | InteroceptivePredictionError | |
|
|
112
|
+
| HardwareInteroception | SensoryOverload | InteroceptiveSignals | InteroceptivePredictionError | SomaticMarkerNetwork |
|
|
113
|
+
|
|
114
|
+
`InteroceptivePredictionError` also carries a real personality-scaling extension (`getAnxietyContribution(neuroticismScale)`, 0.1.5, defaults to 1 so every prior caller is unaffected): trait Neuroticism amplifies how much a given interoceptive mismatch is felt as anxiety.
|
|
102
115
|
|
|
103
116
|
### ⚖️ `economics/`
|
|
104
117
|
|
|
@@ -131,14 +144,14 @@ Pluggable language backends, from a zero-dependency lexicon to a real transforme
|
|
|
131
144
|
|
|
132
145
|
## How coherent is this, really?
|
|
133
146
|
|
|
134
|
-
Short version: **~80-83% with an LLM connected, ~64-68% 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.
|
|
147
|
+
Short version: **~80-83% with an LLM connected, ~64-68% 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. This is not an average of the row values below, since the headline also discounts for integrated-system validation that doesn't exist yet. **Unchanged since 0.1.3, on purpose**: this release's 23 new mechanisms (20 identity/social/regulation ones plus `GlobalWorkspace`, `PrimaryDrives`, `EmotionalImmuneSystem`) are real and individually cited, but several score BELOW the layer averages they landed in on their own per-mechanism grounding; see the per-mechanism table below and `CALIBRATION.md` for exactly which ones and why. Adding more real mechanisms doesn't automatically raise the aggregate, and bumping the headline just because more code shipped would be exactly the kind of over-claiming this ledger exists to catch. Full citation ledger: [`CALIBRATION.md`](CALIBRATION.md).
|
|
135
148
|
|
|
136
149
|
| Layer | With LLM | Heuristic only | Grounded in |
|
|
137
150
|
| --- | --- | --- | --- |
|
|
138
|
-
| State engine | ~83-86% | same | PID control (anti-windup, dynamic set points), Kalman filtering (now with real interoception-informed measurement noise), allostatic load (McEwen & Stellar 1993), prospect-theory loss aversion, TD reward-prediction-error with eligibility traces (Sutton & Barto), wanting/liking dissociation (Berridge & Robinson 1998) with allostatic-load-driven anhedonia, circumplex/PAD affect space with momentum/hysteresis, Holmes & Rahe life-event severity, the two-process sleep-pressure model (Borbély 1982), the opponent-process a/b dynamic (Solomon & Corbit 1974) |
|
|
139
|
-
| 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 |
|
|
140
|
-
| Expression / output | ~91-94% | ~64-70% | Structured system-prompt injection, coherence validation against prior turns, attachment-weighted style adaptation, a full-state-weighted action-tendency policy, real suppression-cost accrual, cognitive-load-derived output metadata, a real approach-avoidance conflict dampening expression confidence (Miller 1944) |
|
|
141
|
-
| Cross-turn continuity | ~93-96% | same | Persistent state serialization, asymmetric trust/reputation tracking, attachment styles with rupture-and-repair (Bartholomew & Horowitz 1991; Gottman & Levenson 1992) now with state-dependent style switching under stress (Mikulincer & Shaver 2016), memory reconsolidation on retrieval (Nader et al. 2000), unresolved-memory flagging with intrusive resurfacing, idle-time-based consolidation, long-horizon memory decay with similarity-triggered reactivation and bittersweet nostalgic reconsolidation (Walker, Skowronski & Thompson 2003), grief as a real decaying-with-waves process (Bonanno 2004; Zisook & Shear 2009),
|
|
151
|
+
| State engine | ~83-86% | same | PID control (anti-windup, dynamic set points), Kalman filtering (now with real interoception-informed measurement noise), allostatic load (McEwen & Stellar 1993), prospect-theory loss aversion, TD reward-prediction-error with eligibility traces (Sutton & Barto), wanting/liking dissociation (Berridge & Robinson 1998) with allostatic-load-driven anhedonia, circumplex/PAD affect space with momentum/hysteresis, Holmes & Rahe life-event severity, the two-process sleep-pressure model (Borbély 1982), the opponent-process a/b dynamic (Solomon & Corbit 1974), a real general attentional-effort budget (Kahneman 1973) distinct from the self-regulation-specific one |
|
|
152
|
+
| 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, cultural-script activation (honor culture: Nisbett & Cohen 1996; self-construal: Markus & Kitayama 1991; reciprocity: Gouldner 1960) |
|
|
153
|
+
| Expression / output | ~91-94% | ~64-70% | Structured system-prompt injection, coherence validation against prior turns, attachment-weighted style adaptation, a full-state-weighted action-tendency policy, real suppression-cost accrual, cognitive-load-derived output metadata, a real approach-avoidance conflict dampening expression confidence (Miller 1944), an active real regulation-strategy selection (Gross 1998) replacing a single fixed suppression pipeline, a real divergent/convergent creative-mode temperature signal (Guilford 1967; Fredrickson 2001) |
|
|
154
|
+
| Cross-turn continuity | ~93-96% | same | Persistent state serialization, asymmetric trust/reputation tracking, attachment styles with rupture-and-repair (Bartholomew & Horowitz 1991; Gottman & Levenson 1992) now with state-dependent style switching under stress (Mikulincer & Shaver 2016), memory reconsolidation on retrieval (Nader et al. 2000), unresolved-memory flagging with intrusive resurfacing, idle-time-based consolidation, long-horizon memory decay with similarity-triggered reactivation and bittersweet nostalgic reconsolidation (Walker, Skowronski & Thompson 2003), grief as a real decaying-with-waves process (Bonanno 2004; Zisook & Shear 2009), permanent moral-injury scarring distinct from ordinary dissonance (Litz et al. 2009) now with a real, effortful redemption arc, a real autobiographical narrative with chapter coherence (McAdams 2001), permanent betrayal-trauma trust thresholds (Freyd 1996), and real cumulative somatic-marker decision bias (Damasio 1994) |
|
|
142
155
|
| Subjective experience | **0%** | **0%** | Not a gap to close: no known way to build or verify this in any software |
|
|
143
156
|
|
|
144
157
|
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.
|
|
@@ -159,15 +172,27 @@ The table above scores each functional layer as a whole. This scores ten specifi
|
|
|
159
172
|
| Attachment styles + rupture-and-repair | ~50-58% | Bartholomew & Horowitz's (1991) four-category model and the Gottman/Levenson rupture-and-repair literature are real; mapping OCEAN traits onto attachment-style buckets is our own engineering choice, explicitly not a validated psychometric equivalence |
|
|
160
173
|
| Vaillant defense hierarchy | ~55-63% | Vaillant's (1977) mature/neurotic/immature taxonomy is real, established clinical theory; the ego-health/cortisol-weighted tier-shifting mechanism that picks among them each turn is own design |
|
|
161
174
|
| `LoveHateEngine` dual-valence bond field | ~38-46% | The individual pieces it reuses (diminishing-returns accumulation, kindling, asymmetric decay, rupture-and-repair) each draw on real cited work; the specific coupled two-accumulator update equations are our own engineering design end to end, not a reproduction of any published relational model |
|
|
162
|
-
| Approach-avoidance conflict (`MotivationalConflict`) | ~68-75% | Miller's (1944) real gradient-conflict model, implemented close to literally (two exponential gradients, steeper avoidance decay, a real crossover/vacillation zone)
|
|
175
|
+
| Approach-avoidance conflict (`MotivationalConflict`) | ~68-75% | Miller's (1944) real gradient-conflict model, implemented close to literally (two exponential gradients, steeper avoidance decay, a real crossover/vacillation zone); the specific decay constants and the expression-confidence dampening it feeds are own tuning |
|
|
163
176
|
| Two-process sleep pressure (`SleepPressure`) | ~72-80% | Borbély's (1982) Process S equation implemented directly (saturating exponential rise, exponential fall during a real "sleep" event); the specific rise/fall time constants are own engineering estimates, not measured circadian data |
|
|
164
177
|
| Opponent-process after-effect (`OpponentProcess`) | ~65-72% | Solomon & Corbit's (1974) a-process/b-process structure (habituating peak, growing-and-lengthening undershoot with repetition) implemented as its literal qualitative shape; the specific growth-rate constants are own tuning |
|
|
165
|
-
| Grief as a decaying-with-waves process (`GriefEngine`) | ~45-52% | The general shape (long-tailed, non-monotonic, punctuated by real intrusive waves) draws on real bereavement research (Bonanno 2004; Zisook & Shear 2009) that explicitly rejects a fixed-stage model
|
|
178
|
+
| Grief as a decaying-with-waves process (`GriefEngine`) | ~45-52% | The general shape (long-tailed, non-monotonic, punctuated by real intrusive waves) draws on real bereavement research (Bonanno 2004; Zisook & Shear 2009) that explicitly rejects a fixed-stage model, deliberately NOT modeling Kübler-Ross stages, since that theory lacks the empirical support the shape below draws on instead; the power-law exponent and wave-rate constants are own design |
|
|
166
179
|
| Shame/guilt split (`ShameGuiltSplit`) | ~60-68% | Tangney & Dearing's (2002) real, well-established distinction (identity-level vs. behavior-level, differing persistence); which real Totemheart signals feed each accumulator and the specific decay-rate ratio are own engineering |
|
|
167
180
|
| Moral injury / identity threat (`MoralInjury`, `IdentityThreatMonitor`) | ~55-63% | Litz et al.'s (2009) actual coinage and definition of "moral injury" as distinct from ordinary guilt, and Steele's (1988) self-affirmation/identity-threat theory, both real and well-matched to what's built; the permanence mechanism and severity-threshold/cascade-multiplier math are own design |
|
|
168
181
|
| Dynamic value conflict (`ValueHierarchy`) | ~50-58% | Schwartz's (1992) real, cross-culturally validated basic-values structure supplies the value set and the general "competing values create real tension" framing; the specific EMA nudge rule and conflict-scoring formula are own engineering, not a computational model Schwartz specified |
|
|
169
|
-
|
|
170
|
-
|
|
182
|
+
| Narrative self / chapter coherence (`NarrativeSelfEngine`) | ~48-55% | McAdams' (2001; McAdams & McLean 2013) real narrative-identity framework motivates treating the self as a real, evolving story rather than pure accumulated state; the chapter-theme EMA, coherence formula, and crisis threshold are own engineering, not a computational reproduction of that framework |
|
|
183
|
+
| Developmental staging (`OntogenicDevelopment`) | ~30-38% | Piaget (1952) and Vygotsky (1978) motivate development as qualitative, experience-driven stage change rather than a clock, an explicit engineering borrowing of that SHAPE; the stage boundaries and per-stage trait modifiers are own tuning, not a claim of literal human-child-development equivalence |
|
|
184
|
+
| Betrayal trauma trace (`BetrayalTraumaTrace`) | ~58-65% | Freyd's (1996) actual coinage of "betrayal trauma" as a distinct wound from a trusted source is a real, exact match to this module's trigger condition; the permanence-above-threshold decay shape and trust-threshold formula are own design |
|
|
185
|
+
| Somatic markers (`SomaticMarkerNetwork`) | ~55-62% | Damasio's (1994) real somatic-marker hypothesis motivates accumulative gut-feeling bias from past outcomes; the real token-overlap similarity and exponential-decay marker formula are own engineering, not a reproduction of any specific computational somatic-marker model |
|
|
186
|
+
| Regulation strategy selection (`RegulationStrategySelector`) | ~62-70% | Gross's (1998; Gross & John 2003) real reappraisal-vs-suppression cost/effectiveness taxonomy is well-established; the real argmax cost-benefit selection formula and specific base-cost constants are own engineering |
|
|
187
|
+
| Meta-emotion (`MetaEmotionLayer`) | ~52-60% | Gottman, Katz & Hooven's (1996) actual coinage of "meta-emotion" (real evaluative beliefs about one's own emotions) is a well-matched real citation; the specific standard-deviation valence formula and Neuroticism-bias multiplier are own design |
|
|
188
|
+
| Cultural scripts (`CulturalScriptLibrary`) | ~40-48% | Real, distinct citations for each script (honor: Nisbett & Cohen 1996; self-construal: Markus & Kitayama 1991; reciprocity: Gouldner 1960), but the token-overlap activation mechanic and the specific `cultural_weight`/`honor_factor` constants are own engineering, not a computational model any of those authors specified |
|
|
189
|
+
| Social network graph (`MultiAgentSocialGraph`) | ~35-42% | Real, standard social-network-analysis vocabulary (edge weight, coalition: Wasserman & Faust 1994); the specific Affinity−Aversion+StatusDiff weighting formula is own engineering end to end, not a reproduction of any published relational-network model |
|
|
190
|
+
| Group emotional contagion (`ColonyDynamics`) | ~50-58% | Barsade's (2002) real "ripple effect" finding (emotion spreads through a GROUP, not just dyadically, and group coherence is itself real and measurable) is a well-matched citation; the specific weighted-average contagion formula and 1−variance coherence metric are own design |
|
|
191
|
+
| Global workspace competition (`GlobalWorkspace`) | ~40-48% | Baars (1988; 2005) and Dehaene & Naccache (2001) are real, foundational consciousness-science theory; a real softmax over candidate saliences is a genuine, literal competition, but it's a deliberately narrow, explicitly-scoped-down engineering analog of "access to the workspace," not a claim of modeling ignition/broadcast dynamics or consciousness itself |
|
|
192
|
+
| Primary-process drives (`PrimaryDrives`) | ~55-63% | Panksepp (1998; Panksepp & Biven 2012) is real, cross-species-evidenced neuroscience for exactly these four systems (SEEKING/CARE/PLAY/PANIC-GRIEF) as distinct; the specific bounded-activation-plus-exponential-decay update rule and which existing Totemheart signals feed each drive are own engineering |
|
|
193
|
+
| Sustained-negativity numbing (`EmotionalImmuneSystem`) | ~46-54% | Gilbert (1989; 2009) is real, well-cited theory for defensive numbing under sustained unresolved negative affect; the specific exposure accumulator and saturating dampening curve are own design, and the phenomenon is real but broader in Gilbert's own work than this one narrow accumulator captures |
|
|
194
|
+
|
|
195
|
+
Every mechanism in this table passed a dedicated live audit: `npm run exhaustive-audit` (25/25), `npm run upgrade-round-mock` (39/39), and `npm run lovehate-mock` (24/24) for the earlier rows; [`test/integration/human-friction-mechanisms.test.js`](test/integration/human-friction-mechanisms.test.js) (60/60) plus [`test/integration/cross-mechanism-friction.test.js`](test/integration/cross-mechanism-friction.test.js) (8/8) for the 0.1.3 rows; and [`test/integration/emergent-mechanisms-round3.test.js`](test/integration/emergent-mechanisms-round3.test.js), [`test/integration/emergent-mechanisms-cross.test.js`](test/integration/emergent-mechanisms-cross.test.js), [`test/integration/emergent-full-framework-cross.test.js`](test/integration/emergent-full-framework-cross.test.js), [`test/integration/consciousness-drives-immunity.test.js`](test/integration/consciousness-drives-immunity.test.js), and [`test/plugins-cross/round3-plugins-integration.test.js`](test/plugins-cross/round3-plugins-integration.test.js) (104 tests total) for the 13 rows added in this release. That's internal consistency, not psychological validation, and the percentages above already price that distinction in.
|
|
171
196
|
|
|
172
197
|
## Prerequisites
|
|
173
198
|
|
|
@@ -188,7 +213,7 @@ yarn add totemheart
|
|
|
188
213
|
```js
|
|
189
214
|
import { Totemheart, Personality, VERSION } from 'totemheart'
|
|
190
215
|
|
|
191
|
-
console.log( VERSION ) // '0.1.
|
|
216
|
+
console.log( VERSION ) // '0.1.5', also available as Totemheart.VERSION and in toJSON().version
|
|
192
217
|
|
|
193
218
|
const ai = new Totemheart( {
|
|
194
219
|
personality: new Personality( { neuroticism: 0.7, agreeableness: 0.3 } ),
|
|
@@ -242,19 +267,20 @@ The default model (`kamaludeen/multilingual_go_emotions-ONNX`) was chosen becaus
|
|
|
242
267
|
|
|
243
268
|
## Plugins
|
|
244
269
|
|
|
245
|
-
|
|
270
|
+
Seven official, separately-published packages under [`packages/`](packages), each real and independently tested (39 per-plugin tests + 10 cross-integration tests in [`test/plugins-cross/`](test/plugins-cross); none of them share fate with the core suite, `npm test` alone never runs them; use `npm run test:all`). Every plugin is a duck-typed consumer of the core's real, already-documented extension points (`LanguageProvider`'s `analyze()` contract, `EpisodicMemory`'s `adapter` interface, `ExpressionDirectives`' output); none of them required changing core to build.
|
|
246
271
|
|
|
247
272
|
| Package | What it is | Real, not simulated |
|
|
248
273
|
| --- | --- | --- |
|
|
249
|
-
| [`@totemheart/provider-openai`](packages/provider-openai) | An OpenAI-compatible chat-completions `LanguageProvider` | Real `fetch` to `/chat/completions`; throws on any failure (missing key, unreachable host, bad status), same resilience contract as the built-in `OllamaProvider
|
|
250
|
-
| [`@totemheart/
|
|
251
|
-
| [`@totemheart/
|
|
252
|
-
| [`@totemheart/bridge-
|
|
253
|
-
| [`@totemheart/
|
|
254
|
-
| [`@totemheart/
|
|
274
|
+
| [`@totemheart/provider-openai`](packages/provider-openai) | An OpenAI-compatible chat-completions `LanguageProvider` | Real `fetch` to `/chat/completions`; throws on any failure (missing key, unreachable host, bad status), same resilience contract as the built-in `OllamaProvider`; Totemheart falls back to `HeuristicProvider` transparently |
|
|
275
|
+
| [`@totemheart/provider-anthropic`](packages/provider-anthropic) | An Anthropic Messages API `LanguageProvider` | Real `fetch` to `/v1/messages` with `x-api-key`/`anthropic-version` headers; throws on any failure (missing key, unreachable host, bad status), same throw-and-fallback resilience contract as `OllamaProvider`/`OpenAIProvider` |
|
|
276
|
+
| [`@totemheart/store-sqlite`](packages/store-sqlite) | A real, on-disk `EpisodicMemory` adapter | Node's built-in `node:sqlite`, zero external dependency; real persistence verified by closing and reopening the database file. **Known, documented limitation**: `EpisodicMemory`'s adapter contract as implemented in core today only routes `store()`/`recall()` through the adapter; `markResolved()`, `getUnresolvedMemories()`, Zeigarnik pressure, and REM-salience all still read the in-memory array, which stays empty when an adapter is set. Verified explicitly in this plugin's own tests, not silently assumed to work |
|
|
277
|
+
| [`@totemheart/bridge-tts`](packages/bridge-tts) | Maps real `ExpressionDirectives.getProsodyDirectives()` output onto standard SSML `<prosody>` markup | W3C SSML, not a single vendor's proprietary format; usable as-is with Azure, Amazon Polly, or Google Cloud TTS. No API calls (no credentials this package could honestly claim to have) |
|
|
278
|
+
| [`@totemheart/bridge-robotics`](packages/bridge-robotics) | Maps real `getPostureDirectives()`/`getActionTendency()` output onto a generic actuator-command schema and sends it over real HTTP | Genuine network I/O, tested against a real local listener; not a claim of ROS2/vendor-protocol conformance, since there's no real robot here to verify that against |
|
|
279
|
+
| [`@totemheart/devtools`](packages/devtools) | A zero-dependency local HTTP dashboard for a running `Totemheart` instance | Real `node:http` server exposing `getEmotionalState()` and the real `ExplainabilityEngine` decision log live, including every round-3 field (`legacyMemory`, `betrayalTraumaTrace`, `culturalScriptLibrary`, `somaticMarkerNetwork`, `powerDynamicsEngine`, `insightGenerator`, `colony`, `primaryDrives`, `immuneExposure`, `immuneDampening`), polled by a minimal dashboard page, no `console.log`-only debugging |
|
|
280
|
+
| [`@totemheart/audit-kit`](packages/audit-kit) | Reusable cross-mechanism test helpers | Extracted directly from `test/integration/cross-mechanism-friction.test.js`: the same `assertFiniteState`/`driveToRupture`/`noBurst`/`noHijack` helpers this repo uses on itself, packaged for a fork or downstream app to run the same discipline against its own scenarios |
|
|
255
281
|
|
|
256
282
|
```bash
|
|
257
|
-
npm install @totemheart/provider-openai @totemheart/store-sqlite @totemheart/bridge-tts @totemheart/bridge-robotics @totemheart/devtools @totemheart/audit-kit
|
|
283
|
+
npm install @totemheart/provider-openai @totemheart/provider-anthropic @totemheart/store-sqlite @totemheart/bridge-tts @totemheart/bridge-robotics @totemheart/devtools @totemheart/audit-kit
|
|
258
284
|
```
|
|
259
285
|
|
|
260
286
|
## License
|