totemheart 0.1.6 → 0.1.7
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 +74 -29
- package/package.json +2 -1
- package/src/Totemheart.js +528 -22
- package/src/behavior/DisagreementStyle.js +47 -0
- package/src/cognition/AssertivenessBoundary.js +42 -0
- package/src/cognition/DeceptionDecisionEngine.js +117 -0
- package/src/cognition/EmotionalOntology.js +20 -1
- package/src/cognition/EpistemicTrust.js +84 -0
- package/src/cognition/FlowStateEngine.js +72 -0
- package/src/cognition/InsightGenerator.js +38 -4
- package/src/cognition/ManipulationSkepticism.js +50 -0
- package/src/cognition/OpinionStanceEngine.js +91 -0
- package/src/cognition/ReliefEngine.js +35 -6
- package/src/cognition/TipOfTongue.js +36 -0
- package/src/control/ActivationSteeringBridge.js +53 -0
- package/src/control/ControlPacketCompiler.js +80 -0
- package/src/control/DecodingSteeringAdapter.js +45 -0
- package/src/control/FineTuneCurriculum.js +52 -0
- package/src/control/NBestReranker.js +26 -0
- package/src/control/PostGenStateAligner.js +81 -0
- package/src/control/RepairRewriter.js +86 -0
- package/src/control/StateLockedMemory.js +46 -0
- package/src/core/BoredomSystem.js +47 -9
- package/src/core/SocialFatigueEngine.js +76 -0
- package/src/integration/ContextAdapter.js +31 -1
- package/src/social/AffinityResonance.js +42 -0
- package/src/social/AmbientBehavioralTrace.js +356 -0
- package/src/social/AnticipatorySavoring.js +49 -0
- package/src/social/CapitalVicesEngine.js +187 -0
- package/src/social/ClinginessEngine.js +108 -0
- package/src/social/ComfortAccumulation.js +72 -0
- package/src/social/ComfortSeekingEngine.js +77 -0
- package/src/social/ContactFrequencyExpectation.js +87 -0
- package/src/social/DailyExpectationEngine.js +113 -0
- package/src/social/FirstImpressionEngine.js +80 -0
- package/src/social/ForgivenessProcess.js +70 -0
- package/src/social/GratitudeEngine.js +46 -1
- package/src/social/InfatuationEngine.js +187 -0
- package/src/social/JealousyTriangle.js +72 -1
- package/src/social/NostalgiaEngine.js +41 -1
- package/src/social/PrideCompetenceEngine.js +85 -0
- package/src/social/ProtectiveInstinctEngine.js +42 -0
- package/src/social/SocialGraphClassifier.js +103 -0
- package/src/social/TraumaCascadeEngine.js +59 -5
- package/src/social/TrustRiskDecision.js +58 -0
- package/src/social/ValidationSeekingEngine.js +69 -0
package/README.md
CHANGED
|
@@ -4,27 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](CALIBRATION.md)
|
|
7
|
-
[](package.json)
|
|
8
8
|
[](package.json)
|
|
9
|
-
[](test)
|
|
10
10
|
[](examples/verify-all-mechanisms.js)
|
|
11
11
|
|
|
12
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/` (893, 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 3063 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 and relational behavior, not a sentiment classifier and not a prompt-engineering trick. It gives an agent a consistent, inspectable inner state across a conversation and across days: personality, mood, memory, stress, attachment, desire, and social inference that evolve through control-theory and neuroscience-derived dynamics, instead of recomputing each reply from a mood label. Mechanisms interact in chains (bond, residual chemistry, grief, secrecy, intuition) under sparse activation; subjective experience remains 0% by design. See [What this actually is](#what-this-actually-is) below before you build on top of it.
|
|
15
15
|
|
|
16
|
+
Totemheart is an unusually dense, test-heavy, inspectable kernel for persistent relational and affective dynamics—built to make human-like behavioral continuity computable and controllable, without claiming sentience.
|
|
17
|
+
|
|
16
18
|
## Table of Contents
|
|
17
19
|
|
|
18
20
|
- [How this differs from a sentiment-based chatbot layer](#how-this-differs-from-a-sentiment-based-chatbot-layer)
|
|
19
21
|
- [What this actually is](#what-this-actually-is)
|
|
20
22
|
- [Architecture](#architecture)
|
|
21
23
|
- [How coherent is this, really?](#how-coherent-is-this-really)
|
|
22
|
-
- [Human Dynamics That Emerge On Their Own](#human-dynamics-that-emerge-on-their-own)
|
|
23
24
|
- [Per-mechanism grounding](#per-mechanism-grounding)
|
|
25
|
+
- [Human Dynamics That Emerge On Their Own](#human-dynamics-that-emerge-on-their-own)
|
|
24
26
|
- [Prerequisites](#prerequisites)
|
|
25
27
|
- [Installation](#installation)
|
|
26
28
|
- [Usage](#usage)
|
|
27
29
|
- [Wiring it into a real LLM (Claude, GPT, Ollama, anything)](#wiring-it-into-a-real-llm-claude-gpt-ollama-anything)
|
|
30
|
+
- [Model Control Plane: making the LLM's actual output text respect the state](#model-control-plane-making-the-llms-actual-output-text-respect-the-state)
|
|
28
31
|
- [Real ML instead of heuristics: TransformersProvider](#real-ml-instead-of-heuristics-transformersprovider)
|
|
29
32
|
- [Plugins](#plugins)
|
|
30
33
|
- [License](#license)
|
|
@@ -68,42 +71,21 @@ Every mechanic is a small, independent class with its own state, one file per me
|
|
|
68
71
|
|
|
69
72
|
## How coherent is this, really?
|
|
70
73
|
|
|
71
|
-
Short version: **~
|
|
74
|
+
Short version: **~81-85% with an LLM connected (especially when the host uses the control plane: packet compilation, N-best reranking, post-gen alignment), ~63-67% 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. A small upward revision after multi-day chain batteries and a same-turn control plane that compiles internal state into enforceable generation constraints, not from module count alone, and still without external psychologist/user validation; the per-layer scores below remain qualitative and citation-weighted, not a claim of sentience, clinical fidelity, or validation against psychologist judges/real labeled chat data, which still don't exist.
|
|
72
75
|
|
|
73
76
|
Full citation ledger: 📑 [`CALIBRATION.md`](CALIBRATION.md).
|
|
74
77
|
|
|
75
78
|
| Layer | With LLM | Heuristic only | Grounded in |
|
|
76
79
|
| --- | --- | --- | --- |
|
|
77
|
-
| State engine | ~
|
|
80
|
+
| State engine | ~82-85% | 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, plus 0.1.6's hyperbolic discounting (Ainslie 1975) and inhibitory control pool (Hofmann et al. 2012) pulling this row down slightly, and its own-design-heavy "butterflies"/global-mood-abatement additions pulling it down further; `HappinessEngine`, `TraumaCascadeEngine`, and `YearningEngine`/`BoredomSystem`'s new per-user engagement now add real, verified dynamics on top, a small honest nudge upward, though much of the specific combining math there is still own engineering, not literal published constants |
|
|
78
81
|
| 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); 0.1.6's metacognitive-confidence and source-monitoring additions land close to this row's existing average, no meaningful shift |
|
|
79
|
-
| Expression / output | ~
|
|
80
|
-
| Cross-turn continuity | ~
|
|
82
|
+
| Expression / output | ~88-92% | ~63-69% | 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); pulled down by 0.1.6's own-design-heavy `BlushSlipEngine` (~28-35%) and `HumanDiscourseShaper`/`PercentageOfAssets` (~40-52%), each real and cited but scoring well below this row's prior average; `ChildlikeMode` genuinely widens the directive space (real suppression/boost signals for tone, discourse, chills); the round-61 control plane (`ControlPacketCompiler`, `NBestReranker`, `PostGenStateAligner`) closes a real chunk of the old state→text wiring gap by compiling this turn's own state into enforceable bans/must constraints and scoring candidates against them, so the "with LLM" figure moves up; the heuristic-only figure moves up only slightly, since the gain is concentrated in hosts that actually wire the control plane into generation |
|
|
83
|
+
| Cross-turn continuity | ~91-95% | 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); pulled down by 0.1.6's `RelationalMemoryCatalog`/`GrudgeSystem`/`GhostingDetector`/`FrikiEngine` (~35-50% each) diluting an otherwise very high-scoring row; this is the row the multi-day/multi-round system tests actually exercise (reunion reactivation, ritual/inside-joke reactivation, cumulative suspicion, cross-relationship arcs, co-regulation vs. isolation recovery); the 20-test long-chain battery and the round-58/59 relational-essentials set (reciprocity ledgers, affiliation set point, source monitoring, prospective memory) add further real, verified cross-turn dynamics on top, genuinely the strongest, most-validated row now |
|
|
81
84
|
| Subjective experience | **0%** | **0%** | Not a gap to close: no known way to build or verify this in any software |
|
|
82
|
-
| **Headline** | **~
|
|
85
|
+
| **Headline** | **~81-85%** | **~63-67%** | Small, honest upward revision from the previous baseline (~79-83% / ~62-66%), justified by the multi-day chain batteries plus the round-61 control plane compiling this turn's own state into enforceable generation constraints, not by row count or module count alone; still not an average of the rows above, still discounted for the real integrated-system validation (psychologist judges, labeled chat data, real-user testing) that still doesn't exist |
|
|
83
86
|
|
|
84
87
|
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. These are still self-assessed qualitative estimates, not a computed weighted average over the per-mechanism table: treat the direction (a small, honest step up this round, from real multi-day system-test validation, not from module count) as the meaningful signal, not the exact digits.
|
|
85
88
|
|
|
86
|
-
### Human Dynamics That Emerge On Their Own
|
|
87
|
-
|
|
88
|
-
In tests lasting days and weeks, the system doesn't simply label a shift. Human dynamics of connection, absence, doubt, harm, and recovery emerge from the state that persists over time.
|
|
89
|
-
|
|
90
|
-
| Human Dynamics | What is observed over time |
|
|
91
|
-
| --- | --- |
|
|
92
|
-
| Reconnection after a long time | The warmth and weight of past experiences return at first contact, without starting from scratch |
|
|
93
|
-
| Memory triggered by an intimate phrase | A ritual, nickname, or inside joke suddenly reopens memories and emotions |
|
|
94
|
-
| Suspicion that builds up little by little | Repeated small evasions build distrust over time, rather than an instant judgment |
|
|
95
|
-
| Not inventing danger where there is none | Threats do not appear in neutral messages; doubt is reserved for ambiguity |
|
|
96
|
-
| Viewing betrayal differently depending on prior state | The same wound hurts differently if expectations were high or if the bond was already cold |
|
|
97
|
-
| Freezing when there is no way out | Faced with the same hostility, one reacts if escape is possible; if trapped, one freezes more |
|
|
98
|
-
| Healing faster with genuine support | After a blow, containment and validation change mood, stress, and trust; minimizing it isolates |
|
|
99
|
-
| Grieving for someone who is not the partner | One can suffer from an external loss without it meaning a breakup with the partner |
|
|
100
|
-
| Getting tired of the same repeated blow | Identical things lose their impact; new things hurt again |
|
|
101
|
-
| Life in stages | Over a long arc, desire, distance, reconnection, and doubt appear without being manually orchestrated |
|
|
102
|
-
| Desire in "inappropriate" moments | Caring or reconnecting can awaken attraction even if the context is delicate |
|
|
103
|
-
| Love and rejection at the same time | After a strong conflict, attachment and pain can coexist, rather than just one clear feeling |
|
|
104
|
-
| Cooling off without reaching hatred | Initiative and interest drop when there is no longer novelty or pull, even if there is no fight |
|
|
105
|
-
| Illusion that blinds for a while | When things are going very well, it is hard to register the same warning signs |
|
|
106
|
-
|
|
107
89
|
### Per-mechanism grounding
|
|
108
90
|
|
|
109
91
|
The table above scores each functional layer as a whole. This scores ten specific, individually-audited mechanisms instead: how much of *that one technique* is real citable theory vs. own engineering, independent of which layer it feeds.
|
|
@@ -221,6 +203,46 @@ The table above scores each functional layer as a whole. This scores ten specifi
|
|
|
221
203
|
| ChildlikeMode: a real playful stance, not baby-talk | ~54-63% | Panksepp's (1998) real PLAY primary-process account (already cited for `PrimaryDrives.js`); Bowlby (1988)/Ainsworth (1978) real secure-base finding that felt security enables exploratory/playful behavior; Fredrickson's (2001) real broaden-and-build theory (already cited for `HappinessEngine.js`) grounds why positive affect broadens toward play; a real smoothed, persistent per-user activation gates real (never-zeroing) suppression of adult-serious weight, a real play/friki-share boost, and a real hard abort on genuine threat/shame/precisionMode; the specific weight constants, gate threshold, and smoothing/decay rates are own engineering |
|
|
222
204
|
| Per-user engagement/boredom, extending the pre-existing BoredomSystem | ~55-64% | Eastwood, Frischen, Fenske & Smilek's (2012) real boredom-as-unengaged-attention account (the same real citation the pre-existing global `BoredomSystem` already used); Berlyne's (1960) real inverted-U arousal/interest account grounds understimulation; real PartnerPull composes already-tracked bond/desire/yearning/oxytocin/aversion/cooling/betrayal-trace signals into one real "does this person still pull attention" read, with a real hard override so genuine threat is never misread as boredom; the specific weight constants and the non-deterministic novelty-seeking probability are own engineering |
|
|
223
205
|
|
|
206
|
+
### Human Dynamics That Emerge On Their Own
|
|
207
|
+
|
|
208
|
+
In tests lasting days and weeks, the system doesn't simply label a shift. Human dynamics of connection, absence, doubt, judgment, harm, and recovery emerge from the state that persists over time.
|
|
209
|
+
|
|
210
|
+
| Human Dynamics | What is observed over time |
|
|
211
|
+
| --- | --- |
|
|
212
|
+
| Reconnection after a long time | The warmth and weight of past experiences return at first contact, without starting from scratch |
|
|
213
|
+
| Memory triggered by an intimate phrase | A ritual, nickname, or inside joke suddenly reopens memories and emotions |
|
|
214
|
+
| Suspicion that builds up little by little | Repeated small evasions build distrust over time, rather than an instant judgment |
|
|
215
|
+
| Not inventing danger where there is none | Threats do not appear in neutral messages; doubt is reserved for ambiguity |
|
|
216
|
+
| Viewing betrayal differently depending on prior state | The same wound hurts differently if expectations were high or if the bond was already cold |
|
|
217
|
+
| Freezing when there is no way out | Faced with the same hostility, one reacts if escape is possible; if trapped, one freezes more |
|
|
218
|
+
| Healing faster with genuine support | After a blow, containment and validation change mood, stress, and trust; minimizing it isolates |
|
|
219
|
+
| Grieving for someone who is not the partner | One can suffer from an external loss without it meaning a breakup with the partner |
|
|
220
|
+
| Getting tired of the same repeated blow | Identical things lose their impact; new things hurt again |
|
|
221
|
+
| Life in stages | Over a long arc, desire, distance, reconnection, and doubt appear without being manually orchestrated |
|
|
222
|
+
| Desire in "inappropriate" moments | Caring or reconnecting can awaken attraction even if the context is delicate |
|
|
223
|
+
| Love and rejection at the same time | After a strong conflict, attachment and pain can coexist, rather than just one clear feeling |
|
|
224
|
+
| Cooling off without reaching hatred | Initiative and interest drop when there is no longer novelty or pull, even if there is no fight |
|
|
225
|
+
| Illusion that blinds for a while | When things are going very well, it is hard to register the same warning signs |
|
|
226
|
+
| Love-bomb then sparse contact | Intense early warmth fades as contact becomes sporadic; the bond is re-read as less genuine |
|
|
227
|
+
| Trust eroded by quiet broken promises | Small unkept commitments accumulate into lower credibility and a harsher opinion of reliability |
|
|
228
|
+
| Disagreement without hatred | A weak idea can be opposed while the bond itself stays intact |
|
|
229
|
+
| Asking for comfort and being minimized | A bid for support that meets dismissal raises loneliness and protest more than matched care does |
|
|
230
|
+
| Social fatigue after an intense stretch | After a dense period of contact, the pull to withdraw can rise even if the person is still valued |
|
|
231
|
+
| Holding a boundary under pressure | Attraction or play can rise, yet the system can still refuse to yield |
|
|
232
|
+
| Shared humor, then flat correctness | When joint laughter disappears, distance can grow without an explicit fight |
|
|
233
|
+
| Jealousy from praise of a rival | Admiring a third party can raise jealousy and resentment without a tracked second relationship |
|
|
234
|
+
| First impressions that stick | A strong early read keeps coloring later ambiguous signals |
|
|
235
|
+
| Protecting a partner under attack | An external attack can raise protective care and steady the bond |
|
|
236
|
+
| Forgiveness in words, memory in the body | Trust may move before chemistry does; grievance can remain after a verbal reopen |
|
|
237
|
+
| Fatigue changing how conflict sounds | Under strain, disagreement leans more combative or blunt than when rested |
|
|
238
|
+
| Reunion with residual caution | Coming back after absence can restore warmth while skepticism about motives still checks the moment |
|
|
239
|
+
| Play giving way to seriousness | A playful stance can stay up until real threat, while heavy topics raise boredom or mismatch instead of trauma |
|
|
240
|
+
| Gratitude softening old scorekeeping | Real help can raise sustained gratitude and slightly ease grievance or boredom |
|
|
241
|
+
| Hope before a plan, crash when it fails | Anticipation amplifies the drop when a promised event is cancelled |
|
|
242
|
+
| Detecting opportunism and rewiring the read | When favors and affection look one-sided, credibility, boundaries, and graph classification move together |
|
|
243
|
+
| Validation versus invalidation of one's story | Being told "you're not crazy" eases recovery; being dismissed stings and feeds self-attack |
|
|
244
|
+
| Long arcs that reorganize several systems at once | Over weeks, flirt, reliability, comfort-seeking, boundaries, and repair can shift as one life, not as isolated flags |
|
|
245
|
+
|
|
224
246
|
## Prerequisites
|
|
225
247
|
|
|
226
248
|
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.
|
|
@@ -274,6 +296,29 @@ await client.chat.completions.create( {
|
|
|
274
296
|
|
|
275
297
|
`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.
|
|
276
298
|
|
|
299
|
+
### Model Control Plane: making the LLM's actual output text respect the state
|
|
300
|
+
|
|
301
|
+
`systemPrompt` alone is a real, honest best-effort: nothing verifies the model actually followed it. `processInput()` also returns a real `controlPacket` (structured, machine-readable state, with `bans`/`must` and a softmax `priority` for when directives conflict), `stateLockedMemory` (a short digest to re-inject every turn so the model's own context window is never the source of truth for the affective state), and `decodingSteering` (a real `temperature` and `bannedPhrases` list for a host's own decoding parameters). `systemPrompt` itself already carries this SAME turn's own hardened bans/must as an explicit "RESTRICCIONES DE ESTE TURNO" block.
|
|
302
|
+
|
|
303
|
+
For a host that wants an actual **guarantee**, not just a well-worded prompt, `src/control/` also ships `PostGenStateAligner` (scores a candidate reply against the control packet), `NBestReranker` (picks the best of K real candidates), and `RepairRewriter` (local, deterministic fixes for a mostly-good candidate). The full loop:
|
|
304
|
+
|
|
305
|
+
```js
|
|
306
|
+
const result = await ai.processInput( userMessage, { userId } )
|
|
307
|
+
|
|
308
|
+
const candidates = await Promise.all(
|
|
309
|
+
Array.from( { length: 3 }, () => llm.generate( result.systemPrompt, userMessage ) ),
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
const { best } = ai.nBestReranker.rerank( candidates, result.controlPacket )
|
|
313
|
+
let finalText = best.text
|
|
314
|
+
|
|
315
|
+
if ( best.align < 0.7 ) {
|
|
316
|
+
finalText = ai.repairRewriter.repair( best.text, best.violations, result.controlPacket ).text
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Run `npm run controlled-generate` ([`examples/controlled-generate.js`](examples/controlled-generate.js)) to see this end to end against a deterministic mock LLM (no network access needed). **Honest limits, not glossed over**: Totemheart never calls an LLM itself, so this is real infrastructure a host wires their own model into, not something that runs on its own; `ActivationSteeringBridge`'s own per-axis coefficients only do anything with real model-weight access (a local open-weight checkpoint), never with a closed API; `FineTuneCurriculum` only accumulates and exports a real `(controlPacket, user, assistant)` dataset, it doesn't run training itself. Full write-up and citations in [`CALIBRATION.md`](CALIBRATION.md).
|
|
321
|
+
|
|
277
322
|
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. Run `npm run upgrade-round-mock` for the momentum/hysteresis, allostatic-load, wanting/liking, reconsolidation, attachment-style, graded-hijack, Vaillant-defense, expression-policy, resource-allocation, and circadian-coupling round, or `npm run lovehate-mock` for `LoveHateEngine`'s ambivalence, kindling, and rupture-and-repair cycle end to end.
|
|
278
323
|
|
|
279
324
|
**Gold-standard regression checks**: `npm run gold-standard-mock` ([`examples/five-emergent-human-tests-mock.js`](examples/five-emergent-human-tests-mock.js)) runs 5 real, multi-week emergent-behavior scenarios end to end (verbal-vs-chemical forgiveness lag, symbolic jealousy from comparison alone, third-party bereavement vs. relational cooling, blush/micro-slips under romantic tension with a strict factual mask, and ex-partner reentry competing against a newer bond). Tests 1 and 5 (forgiveness lag, ex reentry) are the two with the cleanest, most reproducible emergent signal and are the ones worth re-running as a qualitative gold standard before every release, on top of the automated suite above: real bondNet/trust recovering days before oxytocin/opioid do, and a real loyalty conflict with no automatic reset to whichever bond has the higher instantaneous oxytocin reading.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "totemheart",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"packages/*"
|
|
6
6
|
],
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"demo": "node examples/demo.js",
|
|
18
18
|
"verify": "node examples/verify-all-mechanisms.js",
|
|
19
19
|
"stress-test": "node examples/full-stress-test.js",
|
|
20
|
+
"controlled-generate": "node examples/controlled-generate.js",
|
|
20
21
|
"personality-mock": "node examples/personality-mock.js",
|
|
21
22
|
"rem-mock": "node examples/rem-conversation-mock.js",
|
|
22
23
|
"exhaustive-audit": "node examples/exhaustive-audit-mock.js",
|