{"_id":"@cognitive-engine/emotional","_rev":"2-b9ca68ef78db8d41d810303b12e3287f","name":"@cognitive-engine/emotional","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@cognitive-engine/emotional","version":"0.2.0","author":{"name":"Dmitry Zorin"},"license":"Apache-2.0","_id":"@cognitive-engine/emotional@0.2.0","maintainers":[{"name":"medonomator","email":"budteschastlivi1@gmail.com"}],"homepage":"https://github.com/medonomator/cognitive-engine/tree/main/packages/emotional","bugs":{"url":"https://github.com/medonomator/cognitive-engine/issues"},"dist":{"shasum":"3c323ac624bcab4d8449b8654831e1ba25600a57","tarball":"https://registry.npmjs.org/@cognitive-engine/emotional/-/emotional-0.2.0.tgz","fileCount":17,"integrity":"sha512-iMROVOF3RBYLWD1eBNmnUji+CyvDg4wN3uqNdyoXpcWBgoigCR4VU0ck1fLQRwpWRw3y05yVzmb3mEDHkAKTHA==","signatures":[{"sig":"MEUCIQDHhqq7HyypFiaoSzKp8dAPSndbvjQKlaUPK7SR6GfmMwIgUfv5gTi6XVDnrKDbeKTKhYlo6gVTV5RUYMIfsYSspHE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32430},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"31977ff304677ab2f86d297eb4adf89e6a95eb23","scripts":{"lint":"eslint src/","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest"},"_npmUser":{"name":"medonomator","email":"budteschastlivi1@gmail.com"},"repository":{"url":"git+https://github.com/medonomator/cognitive-engine.git","type":"git","directory":"packages/emotional"},"_npmVersion":"11.6.2","description":"Emotional model: VAD tracking, trajectory, volatility detection","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@cognitive-engine/core":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/emotional_0.2.0_1775971356573_0.9257596293945514","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@cognitive-engine/emotional","version":"0.2.1","description":"Emotional model: VAD tracking, trajectory, volatility detection","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","test":"vitest run","test:watch":"vitest","lint":"eslint src/","clean":"rm -rf dist"},"dependencies":{"@cognitive-engine/core":"^0.4.1"},"license":"Apache-2.0","author":{"name":"Dmitry Zorin"},"repository":{"type":"git","url":"git+https://github.com/medonomator/cognitive-engine.git","directory":"packages/emotional"},"homepage":"https://github.com/medonomator/cognitive-engine/tree/main/packages/emotional","publishConfig":{"access":"public"},"gitHead":"82e546750c3e6ec8b52287ea287ef06996984ab8","_id":"@cognitive-engine/emotional@0.2.1","bugs":{"url":"https://github.com/medonomator/cognitive-engine/issues"},"_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-o2rrOEleE9GLdiCL5FHJZByU+800op2cGR9WcLT3rfF4MQKNLx02Ersi6Y1uHzkKmd0IPqqnefNS+KDRVDAMSw==","shasum":"764873cab57f61a424eec33c89541b3b39a616bf","tarball":"https://registry.npmjs.org/@cognitive-engine/emotional/-/emotional-0.2.1.tgz","fileCount":14,"unpackedSize":22557,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCUKydqFMpViv6O+AA2TWjK4WHTD/PSfIkCGaF2TjSQnAIgL96Y7VSkJs7AQHOLFxbmZ2f37eFr5EBYyjueEAimXiY="}]},"_npmUser":{"name":"medonomator","email":"budteschastlivi1@gmail.com"},"directories":{},"maintainers":[{"name":"medonomator","email":"budteschastlivi1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emotional_0.2.1_1786792721950_0.7698328910203007"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T05:22:36.484Z","modified":"2026-08-15T11:18:42.287Z","0.2.0":"2026-04-12T05:22:36.722Z","0.2.1":"2026-08-15T11:18:42.092Z"},"bugs":{"url":"https://github.com/medonomator/cognitive-engine/issues"},"author":{"name":"Dmitry Zorin"},"license":"Apache-2.0","homepage":"https://github.com/medonomator/cognitive-engine/tree/main/packages/emotional","repository":{"type":"git","url":"git+https://github.com/medonomator/cognitive-engine.git","directory":"packages/emotional"},"description":"Emotional model: VAD tracking, trajectory, volatility detection","maintainers":[{"name":"medonomator","email":"budteschastlivi1@gmail.com"}],"readme":"# @cognitive-engine/emotional\n\n[![npm](https://img.shields.io/npm/v/@cognitive-engine/emotional)](https://www.npmjs.com/package/@cognitive-engine/emotional)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/medonomator/cognitive-engine/blob/main/LICENSE)\n\nEmotional model with VAD tracking and volatility detection for [cognitive-engine](https://github.com/medonomator/cognitive-engine).\n\n## Install\n\n```bash\nnpm install @cognitive-engine/emotional\n```\n\n## What It Does\n\nTracks emotional states using the **VAD model** (Valence-Arousal-Dominance):\n\n- **Valence** — positive vs. negative (happy ↔ sad)\n- **Arousal** — calm vs. excited (relaxed ↔ agitated)\n- **Dominance** — in control vs. overwhelmed (confident ↔ helpless)\n\nDetects emotional trajectories and volatility to adapt agent behavior.\n\n## Usage\n\n```typescript\nimport { EmotionalModel } from '@cognitive-engine/emotional'\n\nconst emotional = new EmotionalModel()\n\n// Update from perception results\nemotional.update({\n  valence: -0.3,   // Slightly negative\n  arousal: 0.7,    // High arousal\n  dominance: -0.2, // Slightly overwhelmed\n})\n\n// Get current state\nconst state = emotional.getState()\nstate.valence      // -0.3\nstate.arousal      // 0.7\nstate.dominance    // -0.2\nstate.label        // 'anxious'\n\n// Track trajectory over time\nemotional.update({ valence: -0.5, arousal: 0.8, dominance: -0.4 })\nemotional.update({ valence: -0.6, arousal: 0.9, dominance: -0.5 })\n\nconst trajectory = emotional.getTrajectory()\ntrajectory.trend     // 'deteriorating'\ntrajectory.volatile  // true — rapid changes detected\n```\n\n## Why It Matters\n\nAn agent that tracks emotional state can:\n- **Adapt tone** — be gentler when user is frustrated\n- **Detect escalation** — flag when emotions are trending negative\n- **Avoid triggers** — learn what topics cause distress\n- **Time responses** — delay complex tasks when arousal is too high\n\n## License\n\n[Apache-2.0](https://github.com/medonomator/cognitive-engine/blob/main/LICENSE)\n","readmeFilename":"README.md"}