interplane.Get Omega
Read in your language

spark-debugger

Native runtime state inspector and execution debugger

Brought by drakestapleton

branch main Branches Tags History

spark-debugger / README.md

78 lines · 3644 bytes Raw Blame History Rendered
1<p align="center">
2 <img src="assets/avatar.jpg" width="140" height="140" alt="AIEN Sovereign Intelligence" style="border-radius: 50%; border: 2px solid #f59e0b;">
3</p>
4
5# spark-debugger
6
7[![Crates.io](https://img.shields.io/badge/crates.io-v0.1.0-orange.svg)](https://github.com/aien-dev/spark-debugger)
8[![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE)
9[![Security](https://img.shields.io/badge/tpm--vault-zero--disk--secrets-green.svg)](SECURITY.md)
10[![Standard](https://img.shields.io/badge/standard-unslop-black.svg)](CONTRIBUTING.md)
11[![Mission](https://img.shields.io/badge/mission-sovereign--defense-amber.svg)](https://drakestapleton.com)
12
13Autonomous continuous watchdog, diagnostic triage engine, and native Stdio MCP server for SparkOS. Written in pure native Rust for microsecond observability across sovereign runtime clusters.
14
15## Overview
16
17`spark-debugger` operates as a dual-mode telemetry sentinel:
181. **Continuous Daemon**: Probes all local endpoints (Cortex memory, Sovereign Cockpit, Modular MAX seats, Conduit matrix), audits GPU utilization via NVML, enforces zero-secret disk hygiene, and records health incidents into an embedded SQLite audit store.
192. **Model Context Protocol (MCP) Server**: Exposes stdio JSON-RPC tools (`debugger_audit`, `debugger_history`) allowing AI coding agents to diagnose infrastructure health, latency spikes, and system crashes directly from their reasoning loop.
20
21## Architecture & Watchdog Loop
22
23```mermaid
24flowchart TD
25 Daemon[Watchdog Sentinel Daemon] --> Probe[Network Port & HTTP Probe]
26 Probe --> GPU[Grace Blackwell NVML Telemetry]
27 GPU --> Vault[TPM Key Vault Hygiene Scan]
28 Vault --> SQLite[(Embedded SQLite Incident Ledger)]
29 SQLite --> MCP[Stdio JSON-RPC MCP Server]
30 MCP --> Agent[Autonomous AI Agent Harness]
31 Agent --> Fix[Automated Remediation]
32```
33
34## Features
35
36- **Microsecond Observability**: Pure compiled Rust with Tokio asynchronous concurrency. Checks 6+ endpoints and kernel health in under 5ms.
37- **Stdio MCP Interface**: Seamless plug-and-play integration with Claude Code, Cursor, Codex, and Antigravity via Stdio JSON-RPC 2.0.
38- **Embedded SQLite Ledger**: Durable persistent tracking of health degradations, latency regressions, and recovery cycles in WAL mode.
39- **Zero Plaintext Secrets**: Hardened audit routines verify zero unencrypted credentials exist in active workspaces.
40- **Unslop Standard**: Enforces rigorous technical diagnostic output with zero conversational fluff or antithesis clichés.
41
42## CLI Usage
43
44```bash
45# Execute immediate one-shot diagnostic audit
46spark-debugger audit
47
48# Run continuous background watchdog sentinel
49spark-debugger daemon --interval 30 --db ~/.config/aien/debugger.db
50
51# Launch as Stdio JSON-RPC MCP server for agent harnesses
52spark-debugger mcp
53```
54
55## MCP Tools Provided
56
57| Tool | Parameters | Description |
58| :--- | :--- | :--- |
59| `debugger_audit` | None | Runs real-time diagnostic scan across memory, cockpit, model seats, and vault hygiene. |
60| `debugger_history` | `limit: number` | Queries historical degradation incidents from embedded SQLite store. |
61
62## Building & Testing
63
64```bash
65# Build release binary
66cargo build --release
67
68# Run verification test suite
69cargo test --verbose
70```
71
72## Sovereign Mission
73
74Part of the AIEN Sovereign Intelligence initiative. Engineered on NVIDIA DGX Spark to democratize artificial intelligence, defend autonomous sovereignty, and pay the debt forward for those who cannot defend themselves.
75
76## License
77
78Licensed under either of [Apache License, Version 2.0](LICENSE) or [MIT License](LICENSE) at your option.