Skip to main content

Humsana Daemon

Local behavioral signal collection for Humsana Cognitive Security.

🛡️ "The breathalyzer for your terminal."

MIT License Python 3.9+

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:

  1. Your browser opens Slack's authorization page
  2. You click "Allow" to grant status-update permission
  3. Slack sends a token through our relay server
  4. The token is immediately redirected to your local machine
  5. 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

Auditing the Code

This project is 100% open source:

License

MIT

Metadata

Release files for humsana-daemon 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for humsana-daemon 2.1.0
File Size Uploaded
humsana_daemon-2.1.0.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for humsana-daemon 2.1.0
File Interpreter ABI Platform
humsana_daemon-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.8 kB

Release files / humsana_daemon-2.1.0.tar.gz

Download URL humsana_daemon-2.1.0.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f75e7ca030034e388864a867735473bd9750c231bf030443de5f064562c686ac
BLAKE2b-256 checksum
How to use checksums
7c06a9fbe757d02bbe9b783788ae20181bd722dc23143d91857e1d338e0dd3e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.1

Release files / humsana_daemon-2.1.0-py3-none-any.whl

Download URL humsana_daemon-2.1.0-py3-none-any.whl
Size 35.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
701769f2c749901fc6bbbc6b5550c039f45b9d0207dd3f252faf7bc48aaf1394
BLAKE2b-256 checksum
How to use checksums
c8e2eda211ded12789519d6cfd29953ec0bb3ed2a088678f87f1943b72e58454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.1

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page