{"_id":"@calabamatex/agentsentry","name":"@calabamatex/agentsentry","dist-tags":{"beta":"4.1.0-beta.1","latest":"4.1.0-beta.1"},"versions":{"4.1.0-beta.1":{"name":"@calabamatex/agentsentry","version":"4.1.0-beta.1","description":"AgentSentry v4.1.0-beta — Memory-Aware Agent Management","main":"dist/src/index.js","types":"dist/src/index.d.ts","bin":{"agentsentry":"dist/src/cli/index.js"},"repository":{"type":"git","url":"git+https://github.com/calabamatex/AgentSentry.git"},"license":"MIT","keywords":["agentsentry","agent","observability","memory","ai","llm","mcp"],"publishConfig":{"access":"public"},"scripts":{"prebuild":"rm -rf dist","build":"tsc","test":"vitest run","test:unit":"vitest run --exclude 'tests/contracts/**' --exclude 'tests/e2e/**' --exclude 'tests/performance/**'","test:contracts":"vitest run tests/contracts/","test:e2e":"vitest run tests/e2e/","test:perf":"vitest run tests/performance/","test:watch":"vitest","benchmark":"tsx scripts/run-benchmark.ts","sync-metadata":"tsx scripts/sync-release-metadata.ts","sync-metadata:patch":"tsx scripts/sync-release-metadata.ts --patch","sync-metadata:check":"tsx scripts/sync-release-metadata.ts --check","lint":"eslint src/"},"dependencies":{"@modelcontextprotocol/sdk":"^1.27.1","better-sqlite3":"^11.7.0","uuid":"^10.0.0","zod":"~4.3.6"},"optionalDependencies":{"onnxruntime-node":"^1.20.0"},"devDependencies":{"@types/better-sqlite3":"^7.6.12","@types/node":"^20.0.0","@types/uuid":"^10.0.0","eslint":"^9.0.0","tsx":"^4.21.0","typescript":"^5.6.0","typescript-eslint":"^8.0.0","vitest":"^2.1.0"},"engines":{"node":">=18"},"_id":"@calabamatex/agentsentry@4.1.0-beta.1","gitHead":"cd13d937bd5713d03eca31294d768386841eb1e5","bugs":{"url":"https://github.com/calabamatex/AgentSentry/issues"},"homepage":"https://github.com/calabamatex/AgentSentry#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-VfNygaMY81sP2Yd9feFI3k04T3vvO/cWENqWS69DaYsTyfT+cXqpQPWJryMNORNRHJmp86OpRQ2KJA9pAFJdXw==","shasum":"93cf2387b74dc8286f9d9155c1eea9596f206985","tarball":"https://registry.npmjs.org/@calabamatex/agentsentry/-/agentsentry-4.1.0-beta.1.tgz","fileCount":380,"unpackedSize":1153499,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFstvVNYDQzbi5qgpXcMUc4S8XwoLfw7zhhbMi06rqEyAiAlFdUCEDnHgJLuuJZBhR9AtYclH6W6UyRqDyJcch58qA=="}]},"_npmUser":{"name":"calabamatex","email":"calabama@gmail.com"},"directories":{},"maintainers":[{"name":"calabamatex","email":"calabama@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agentsentry_4.1.0-beta.1_1774902198015_0.5185038206834427"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-30T20:23:17.954Z","4.1.0-beta.1":"2026-03-30T20:23:18.254Z","modified":"2026-03-30T20:23:18.476Z"},"maintainers":[{"name":"calabamatex","email":"calabama@gmail.com"}],"description":"AgentSentry v4.1.0-beta — Memory-Aware Agent Management","homepage":"https://github.com/calabamatex/AgentSentry#readme","keywords":["agentsentry","agent","observability","memory","ai","llm","mcp"],"repository":{"type":"git","url":"git+https://github.com/calabamatex/AgentSentry.git"},"bugs":{"url":"https://github.com/calabamatex/AgentSentry/issues"},"license":"MIT","readme":"# AgentSentry v4.1.0-beta\n\nYour AI agents forget everything between sessions. AgentSentry fixes that.\n\nIt catches secrets before they're committed, warns when context is running low, scores the risk of proposed changes, and remembers what happened across sessions — so you don't have to re-explain context every time you start a new conversation.\n\nNo external services required. Install in 60 seconds. Works out of the box.\n\n## Quick Start\n\n```bash\n# 1. Install dependencies\ncd agent-sentry && npm install\n\n# 2. Build\nnpm run build\n\n# 3. Wire as MCP server in Claude Code\nclaude mcp add agent-sentry -- node dist/src/mcp/server.js\n\n# 4. Verify\nclaude mcp list\n```\n\nThat's it. SQLite storage and noop embeddings work out of the box — no API keys or external services needed.\n\n## What You Get\n\n| Layer | What it does |\n|-------|-------------|\n| **Memory Store** | Hash-chained event storage with auto-pruning, incremental chain verification, and chunked vector search |\n| **MCP Server** | 10 tools exposed via Model Context Protocol (stdio + HTTP) |\n| **Primitives** | 7 composable modules — risk scoring, rules validation, secret scanning, context health, git checks, task sizing, file analysis |\n| **Enablement Engine** | 5 progressive levels from Safe Ground to Full Guard |\n| **Enrichment** | Auto-classification by domain (auth, db, api, testing, config, infra) with root-cause detection |\n| **Intelligence** | Cross-session summaries, pattern detection, and context recall |\n| **Audit Index** | Full-text search over events, file audit trails, session timelines |\n| **Plugin System** | JSON Schema-validated plugins with 11-check validation script |\n\n## Feature Maturity\n\n| Feature | Status | Notes |\n|---------|--------|-------|\n| SQLite memory store | **Stable** | Default provider, hash-chained, auto-pruning |\n| MCP server (10 tools) | **Stable** | stdio + HTTP transport |\n| Claude Code hooks | **Stable** | TypeScript implementations with shell wrappers |\n| Progressive enablement | **Stable** | 5 levels |\n| CLI (13 commands) | **Stable** | init, config, enable, health, memory, metrics, dashboard, stream, plugin, handoff, prune, export, import |\n| Enrichment & observability | **Stable** | Auto-classification, circuit breaker, structured logging |\n| Supabase provider | **Beta** | Requires external Supabase instance |\n| Dashboard / streaming | **Beta** | Local SSE/WebSocket, in-process bus |\n| Cross-session intelligence | **Beta** | Session summaries, pattern detection, context recall |\n| Plugin registry | Experimental | Local directory scanning only |\n| Multi-agent coordination | Experimental | Event-sourced, single-machine only |\n\n## MCP Tools\n\nOnce wired, these tools are available in any Claude Code session:\n\n| Tool | Purpose |\n|------|---------|\n| `agent_sentry_health` | Store stats, chain integrity, embedding state, enablement level |\n| `agent_sentry_capture_event` | Log a hash-chained event (decision, error, tool_use, etc.) |\n| `agent_sentry_check_rules` | Validate a file change against CLAUDE.md/AGENTS.md rules |\n| `agent_sentry_check_context` | Estimate context window usage |\n| `agent_sentry_size_task` | Score risk of a proposed change (LOW/MEDIUM/HIGH/CRITICAL) |\n| `agent_sentry_search_history` | Search the event audit trail |\n| `agent_sentry_scan_security` | Detect secrets in file content |\n| `agent_sentry_check_git` | Git status and hygiene checks |\n| `agent_sentry_recall_context` | Cross-session context recall for current task |\n| `agent_sentry_generate_handoff` | Generate structured handoff message for session continuity |\n\n## Progressive Enablement\n\nAgentSentry ships at **Level 2 (Clear Head)** by default — session checkpoints and context health monitoring are active out of the box. This gives you meaningful safety without configuration overhead.\n\nIf you want to customize, adjust `enablement.level` in `agent-sentry.config.json`:\n\n| Level | Name | What's active |\n|-------|------|--------------|\n| 1 | Safe Ground | save_points (full) |\n| 2 | **Clear Head** (default) | + context_health (full) |\n| 3 | House Rules | + standing_orders (basic) |\n| 4 | Right Size | standing_orders→full, + small_bets (basic) |\n| 5 | Full Guard | small_bets→full, + proactive_safety (full) |\n\n## Storage\n\n- **Default**: SQLite (local, zero-config)\n- **Embeddings**: ONNX all-MiniLM-L6-v2 (384 dimensions) — falls back to noop if model unavailable\n- **Supabase** [beta]: Remote PostgreSQL via Supabase REST API — set `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`\n\nAuto-pruning keeps the database bounded — configure `max_events` and `max_age_days` in `agent-sentry.config.json`.\n\n## Development\n\n```bash\nnpm run build          # TypeScript compilation\nnpm test               # All 1113 tests via vitest\nnpm run test:unit      # Source-only unit tests (no build required)\nnpm run test:contracts # Build artifact validation (requires npm run build first)\nnpm run test:e2e       # End-to-end integration tests\nnpm run test:perf      # Performance benchmarks\nnpm run test:watch     # Watch mode\nnpm run benchmark      # Run performance benchmarks\n```\n\n## Project Structure\n\n> **npm package scope:** The published npm package ships `dist/src/` (runtime core) and `agent-sentry.config.json`. Shell scripts (`scripts/`), plugin templates (`plugins/`), and documentation (`docs/`) are available in the source repository.\n\n```\nsrc/\n  memory/       # Store, schema, providers, migrations, enrichment, intelligence, audit\n  mcp/          # MCP server + 10 tool handlers\n  cli/          # CLI commands, TypeScript hook handlers\n  primitives/   # 7 reusable management patterns\n  enablement/   # Progressive enablement engine\n  analyzers/    # Error handling & PII detection analyzers\n  coordination/ # Multi-agent coordination [experimental]\n  streaming/    # SSE/WebSocket event transport [beta]\n  dashboard/    # Single-file HTML monitoring dashboard [beta]\n  observability/ # Logger, circuit breaker, health, metrics, shutdown\n  plugins/      # Plugin registry\nscripts/        # Thin shell wrappers for hooks\ntests/          # Mirror of src/ structure + e2e + performance\ndocs/           # Getting started, API reference, schema, roadmap\n```\n\n## Documentation\n\n- [First Session Walkthrough](docs/first-session.md) — See AgentSentry in action with concrete examples\n- [Getting Started](docs/getting-started.md) — Install and first audit\n- [API Reference](docs/api-reference.md) — Every module and method\n- [Memory Schema](docs/memory-schema.md) — Event schema for building integrations\n- [Plugin Tutorial](docs/plugin-tutorial.md) — Build custom plugins\n- [Configuration Reference](docs/configuration.md) — Every config option explained\n- [Dashboard Guide](docs/dashboard-guide.md) — Monitoring dashboard and event streaming\n- [Supabase Setup](docs/supabase-setup.md) — Remote storage for teams\n- [Troubleshooting](docs/troubleshooting.md) — Common issues and solutions\n- [Roadmap](docs/ROADMAP.md) — Feature maturity and planned work\n- [Changelog](CHANGELOG.md) — Version history\n\n### Architecture\n\n- [Memory Model](docs/architecture/memory-model.md) — Hash-chained storage, search, and providers\n- [Enablement Model](docs/architecture/enablement-model.md) — The 5-level progressive system\n- [MCP Integration](docs/architecture/mcp-integration.md) — Tools, transports, and auth\n\n## Disabling or Removing AgentSentry\n\nAgentSentry is additive — it does not modify your source code or project files. When `save_points.auto_commit_enabled` is `true` (the default), AgentSentry creates git stash snapshots as safety checkpoints. These are non-destructive and do not alter your commit history. Set `auto_commit_enabled` to `false` in `agent-sentry.config.json` to disable stash snapshots entirely.\n\n**Disable temporarily:** Set `\"enabled\": false` in the `memory` section of `agent-sentry.config.json`. All hooks become no-ops. Your data is preserved.\n\n**Remove completely:**\n\n```bash\nclaude mcp remove agent-sentry        # Unwire the MCP server\nrm -rf agent-sentry/data/             # Delete the SQLite database (optional)\n```\n\nYour code, git history, and Claude Code configuration are unchanged.\n\n## License\n\nSee repository root.\n","readmeFilename":"README.md","_rev":"1-15868c0ce0c5cd9d894699cfeb2fc90a"}