Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/spark-debugger/blob/main/README.md
# spark-debugger
Native runtime state inspector and execution debugger
Brought by drakestapleton
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
branch `main` Branches Tags History
`spark-debugger / README.md`
78 lines · 3644 bytes Raw Blame History Rendered
1
2
3
4
5 # spark-debugger
6
7 [](https://github.com/aien-dev/spark-debugger)
8 [](LICENSE)
9 [](SECURITY.md)
10 [](CONTRIBUTING.md)
11 [](https://drakestapleton.com)
12
13 Autonomous 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:
18 1. **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.
19 2. **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
24 flowchart 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
46 spark-debugger audit
47
48 # Run continuous background watchdog sentinel
49 spark-debugger daemon --interval 30 --db ~/.config/aien/debugger.db
50
51 # Launch as Stdio JSON-RPC MCP server for agent harnesses
52 spark-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
66 cargo build --release
67
68 # Run verification test suite
69 cargo test --verbose
70 ```
71
72 ## Sovereign Mission
73
74 Part 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
78 Licensed under either of [Apache License, Version 2.0](LICENSE) or [MIT License](LICENSE) at your option.