totemheart 0.1.3 → 0.1.4
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 +22 -5
- package/package.json +7 -2
- 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
10
|
[](examples/verify-all-mechanisms.js)
|
|
11
11
|
|
|
12
|
-
> 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`. Two later mechanism rounds (the 10 dynamics upgrades and `LoveHateEngine`) each ship their own dedicated live audit instead of being folded into the `verify` script above: `npm run upgrade-round-mock` (39/39) and `npm run lovehate-mock` (24/24). `npm test` runs [`test/`](test) in full: `regression/` (92, bug-fix guards and basic sanity), `integration/` (245, directed multi-mechanism scenarios, full-pipeline emergency routes crossed through real consecutive turns, exhaustive field-by-field serialization, malformed/hostile-input robustness, concurrent `processInput()` calls, real `OllamaProvider` unreachable-host fallback, non-ES/EN language input, the 18 new relational-friction mechanisms individually, and 8 cross-mechanism scenarios stacking several of them in the same turns — see [`test/integration/cross-mechanism-friction.test.js`](test/integration/cross-mechanism-friction.test.js)), and `property/` (2029, deterministic parameter-grid checks over exact boundaries, combined-extreme OCEAN personality corners, and long-horizon saturation limits including 5000-turn memory/mood-window boundedness — no randomness, same result every run).
|
|
12
|
+
> 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`. Two later mechanism rounds (the 10 dynamics upgrades and `LoveHateEngine`) each ship their own dedicated live audit instead of being folded into the `verify` script above: `npm run upgrade-round-mock` (39/39) and `npm run lovehate-mock` (24/24). `npm test` runs [`test/`](test) in full: `regression/` (92, bug-fix guards and basic sanity), `integration/` (245, directed multi-mechanism scenarios, full-pipeline emergency routes crossed through real consecutive turns, exhaustive field-by-field serialization, malformed/hostile-input robustness, concurrent `processInput()` calls, real `OllamaProvider` unreachable-host fallback, non-ES/EN language input, the 18 new relational-friction mechanisms individually, and 8 cross-mechanism scenarios stacking several of them in the same turns — see [`test/integration/cross-mechanism-friction.test.js`](test/integration/cross-mechanism-friction.test.js)), and `property/` (2029, deterministic parameter-grid checks over exact boundaries, combined-extreme OCEAN personality corners, and long-horizon saturation limits including 5000-turn memory/mood-window boundedness — no randomness, same result every run). `npm run test:all` additionally runs `test:plugins` (36 more: 34 per-plugin tests across the 6 official plugins below plus 2 all-6-plugins-at-once cross-integration scenarios in [`test/plugins-cross/`](test/plugins-cross)) — 2402 real tests total.
|
|
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
|
|
|
@@ -188,7 +188,7 @@ yarn add totemheart
|
|
|
188
188
|
```js
|
|
189
189
|
import { Totemheart, Personality, VERSION } from 'totemheart'
|
|
190
190
|
|
|
191
|
-
console.log( VERSION ) // '0.1.
|
|
191
|
+
console.log( VERSION ) // '0.1.4', also available as Totemheart.VERSION and in toJSON().version
|
|
192
192
|
|
|
193
193
|
const ai = new Totemheart( {
|
|
194
194
|
personality: new Personality( { neuroticism: 0.7, agreeableness: 0.3 } ),
|
|
@@ -240,6 +240,23 @@ const ai = new Totemheart( { provider: new TransformersProvider() } )
|
|
|
240
240
|
|
|
241
241
|
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.
|
|
242
242
|
|
|
243
|
-
##
|
|
243
|
+
## Plugins
|
|
244
|
+
|
|
245
|
+
Six official, separately-published packages under [`packages/`](packages), each real and independently tested (34 per-plugin tests + 2 all-6-at-once 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
|
+
|
|
247
|
+
| Package | What it is | Real, not simulated |
|
|
248
|
+
| --- | --- | --- |
|
|
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` — Totemheart falls back to `HeuristicProvider` transparently |
|
|
250
|
+
| [`@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 |
|
|
251
|
+
| [`@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) |
|
|
252
|
+
| [`@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 |
|
|
253
|
+
| [`@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, polled by a minimal dashboard page — no `console.log`-only debugging |
|
|
254
|
+
| [`@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
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npm install @totemheart/provider-openai @totemheart/store-sqlite @totemheart/bridge-tts @totemheart/bridge-robotics @totemheart/devtools @totemheart/audit-kit
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## License
|
|
244
261
|
|
|
245
262
|
This software is licensed with **[MIT](/LICENSE)**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "totemheart",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"workspaces": [
|
|
5
|
+
"packages/*"
|
|
6
|
+
],
|
|
4
7
|
"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
8
|
"main": "src/index.js",
|
|
6
9
|
"type": "module",
|
|
@@ -19,7 +22,9 @@
|
|
|
19
22
|
"exhaustive-audit": "node examples/exhaustive-audit-mock.js",
|
|
20
23
|
"upgrade-round-mock": "node examples/upgrade-round-mock.js",
|
|
21
24
|
"lovehate-mock": "node examples/lovehate-mock.js",
|
|
22
|
-
"test": "node --test test/regression/*.test.js test/integration/*.test.js test/property/*.test.js"
|
|
25
|
+
"test": "node --test test/regression/*.test.js test/integration/*.test.js test/property/*.test.js",
|
|
26
|
+
"test:plugins": "for d in packages/*/; do (cd \"$d\" && node --test test/*.test.js) || exit 1; done && node --test test/plugins-cross/*.test.js",
|
|
27
|
+
"test:all": "npm test && npm run test:plugins"
|
|
23
28
|
},
|
|
24
29
|
"keywords": [
|
|
25
30
|
"totemheart",
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.
|
|
1
|
+
export const VERSION = '0.1.4'
|