Local behavioral signal collection for Humsana Cognitive Security
Project description
Humsana Daemon
Local behavioral signal collection for Humsana Cognitive Security.
🛡️ "The breathalyzer for your terminal."
What It Does
Humsana daemon runs locally on your machine, detecting fatigue from your typing patterns. When you're tired and try to run a dangerous command (rm -rf, DROP TABLE, kubectl delete), it blocks you.
Features:
- 🧠 Cognitive Interlock — Blocks dangerous commands when fatigued
- 📡 Slack Auto-Status — Team sees when you're in deep focus (optional)
- 🔒 100% Local — All data stays on your machine
- ⚡ Zero Friction Auth — Connect Slack with one click
Installation
pip install humsana-daemon
Quick Start
# Start the daemon
humsana start
# Check your current state
humsana status
# Connect Slack for auto-status (optional)
humsana auth
Commands
| Command | Description |
|---|---|
humsana start |
Start the daemon |
humsana status |
Show current stress/focus/fatigue levels |
humsana auth |
Connect Slack (opens browser, zero friction) |
humsana auth status |
Show what's connected |
humsana auth disconnect |
Remove Slack connection |
humsana config |
Open config file |
humsana export |
Export state as JSON (for MCP) |
How It Works
You're tired at 2am, debugging for 8 hours straight.
→ You type: rm -rf ./
→ Humsana detects: fatigue 78%, cognitive load high
→ 🛑 INTERLOCK ENGAGED: Command blocked
→ You can override: "OVERRIDE SAFETY PROTOCOL: P0 production outage"
→ Everything logged to audit trail
Slack Integration
Connect Slack to automatically update your status based on your state:
humsana auth
A browser opens → click "Allow" → done. Your teammates will see:
| Your State | Slack Status |
|---|---|
| Deep focus | 🧠 Deep Focus |
| Stressed | ⚠️ Busy |
| Handling incident | 🚨 Handling Incident |
| Fatigued | 🔋 Low Battery |
Privacy & Security
What Humsana Collects
| Data | Collected? | Details |
|---|---|---|
| Keystrokes (what you type) | ❌ NO | Never captured |
| Timing between keystrokes | ✅ Yes | Used to detect typing rhythm |
| Mouse movements | ❌ NO | Not tracked |
| Screen content | ❌ NO | Never captured |
| Application names | ❌ NO | Not tracked |
Where Data Lives
- All behavioral data stays on your machine in
~/.humsana/signals.db - No data is ever sent to Humsana servers
- Your Slack token is stored locally in
~/.humsana/config.yaml
Slack OAuth Flow
When you run humsana auth:
- Your browser opens Slack's authorization page
- You click "Allow" to grant status-update permission
- Slack sends a token through our relay server
- The token is immediately redirected to your local machine
- We never store your Slack token — it passes through RAM only
The relay server is open source: humsana-auth-relay
Slack Permissions Requested
| Permission | Why |
|---|---|
users.profile:write |
Update your Slack status |
users.profile:read |
Verify connection works |
Data Deletion
To remove all Humsana data:
rm -rf ~/.humsana
To revoke Slack access: Slack Settings → Apps → Humsana Status → Remove
Configuration
Config lives at ~/.humsana/config.yaml:
# Fatigue threshold (0-100) - commands blocked above this
fatigue_threshold: 70
# Commands that trigger the interlock when fatigued
dangerous_commands:
- "rm -rf"
- "DROP DATABASE"
- "DROP TABLE"
- "git push --force"
- "kubectl delete"
- "terraform destroy"
# Slack auto-status
enable_slack_status: true
Works With
- Humsana MCP Server — Claude Desktop integration
Auditing the Code
This project is 100% open source:
- Daemon code — What runs on your machine
- Auth relay — Stateless OAuth handler
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file humsana_daemon-2.1.0.tar.gz.
File metadata
- Download URL: humsana_daemon-2.1.0.tar.gz
- Upload date:
- Size: 32.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f75e7ca030034e388864a867735473bd9750c231bf030443de5f064562c686ac
|
|
| MD5 |
b88e0624ff74bd25aefca7a7547e97f2
|
|
| BLAKE2b-256 |
7c06a9fbe757d02bbe9b783788ae20181bd722dc23143d91857e1d338e0dd3e0
|
File details
Details for the file humsana_daemon-2.1.0-py3-none-any.whl.
File metadata
- Download URL: humsana_daemon-2.1.0-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701769f2c749901fc6bbbc6b5550c039f45b9d0207dd3f252faf7bc48aaf1394
|
|
| MD5 |
fadaf80018ee79456f8729f850a9b87a
|
|
| BLAKE2b-256 |
c8e2eda211ded12789519d6cfd29953ec0bb3ed2a088678f87f1943b72e58454
|