netsky-db 0.1.2

netsky observability database
Documentation
# netsky-db

Durable HTAP scaffold for netsky observability.

## Schema v1

| table | columns |
| --- | --- |
| `messages` | `id`, `ts_utc`, `source`, `direction`, `chat_id`, `from_agent`, `to_agent`, `body`, `raw_json` |
| `cli_invocations` | `id`, `ts_utc`, `bin`, `argv_json`, `exit_code`, `duration_ms`, `host` |
| `crashes` | `id`, `ts_utc`, `kind`, `agent`, `detail_json` |
| `ticks` | `id`, `ts_utc`, `source`, `detail_json` |
| `workspaces` | `id`, `ts_utc_created`, `name`, `branch`, `ts_utc_deleted`, `verdict` |
| `sessions` | `id`, `ts_utc`, `agent`, `session_num`, `event` |

## Open and migrate

```rust
use netsky_db::Db;

let db = Db::open()?;
db.migrate()?;
```

The file lives at `~/.netsky/meta.db`.

## Query

Use `rusqlite` for live writes. Use DuckDB for analytics:

```sql
ATTACH '~/.netsky/meta.db' AS meta (TYPE SQLITE);
SELECT source, count(*) FROM meta.messages GROUP BY 1;
```

## Dashboard

Run the scaffold with:

```bash
uv run --with streamlit --with duckdb streamlit run apps/dashboard/app.py
```